<commit_before>(function (module) {
    mifosX.controllers = _.extend(module, {
        UserSettingController: function (scope, translate, localStorageService, tmhDynamicLocale) {
            if (localStorageService.get('Language')) {
                var temp = localStorageService.get('Language');
                for (var i in mifosX.models.Langs) {
                    if (mifosX.models.Langs[i].code == temp.code) {
                        scope.optlang = mifosX.models.Langs[i];
                        tmhDynamicLocale.set(mifosX.models.Langs[i].code);
                    }
                }
            } else {
                scope.optlang = scope.langs[0];
                tmhDynamicLocale.set(scope.langs[0].code);
            }
            translate.uses(scope.optlang.code);
            scope.dates = [
                'dd MMMM yyyy',
                'dd/MMMM/yyyy',
                'dd-MMMM-yyyy',
                'MMMM-dd-yyyy',
                'MMMM dd yyyy',
                'MMMM/dd/yyyy'
            ];
            scope.$watch(function () {
                return scope.dateformat;
            }, function () {
                localStorageService.add('dateformat', scope.dateformat);
                scope.df = scope.dateformat;
            });
            scope.langs = mifosX.models.Langs;
            scope.changeLang = function (lang) {
                translate.uses(lang.code);
                localStorageService.add('Language', scope.optlang);
                tmhDynamicLocale.set(lang.code);
            };

        }
    });
<commit_msg>MIFOSX-1534: Added DD-MM-YY to date formats as requested, also MM-DD-YY for completeness<commit_after>(function (module) {
    mifosX.controllers = _.extend(module, {
        UserSettingController: function (scope, translate, localStorageService, tmhDynamicLocale) {
            if (localStorageService.get('Language')) {
                var temp = localStorageService.get('Language');
                for (var i in mifosX.models.Langs) {
                    if (mifosX.models.Langs[i].code == temp.code) {
                        scope.optlang = mifosX.models.Langs[i];
                        tmhDynamicLocale.set(mifosX.models.Langs[i].code);
                    }
                }
            } else {
                scope.optlang = scope.langs[0];
                tmhDynamicLocale.set(scope.langs[0].code);
            }
            
            translate.uses(scope.optlang.code);
            
            scope.dates = [
                'dd MMMM yyyy',
                'dd/MMMM/yyyy',
                'dd-MMMM-yyyy',
                'dd-MM-yy',
                'MMMM-dd-yyyy',
                'MMMM dd yyyy',
                'MMMM/dd/yyyy',
                'MM-dd-yy'
            ];
            
            if (localStorageService.get('dateformat')) {
                var temp = localStorageService.get('dateformat');

                for (var i = 0; i < scope.dates.length; i++) {
                    if (scope.dates[i] == temp) {
                        scope.dateformat = scope.dates[i];
                        break;
                    }
                }
            } else {
                scope.dateformat = scope.dates[0];
            }
            
            scope.$watch(function () {
                return scope.dateformat;
            }, function () {
                localStorageService.add('dateformat', scope.dateformat);
                scope.df = scope.dateformat;
            });
            
            scope.langs = mifosX.models.Langs;
            scope.changeLang = function (lang) {
                translate.uses(lang.code);
                localStorageService.add('Language', scope.optlang);
                tmhDynamicLocale.set(lang.code);
            };

        }
    });

{'fraction_non_alphanumeric': 0.1154557463672391, 'fraction_numerical': 0.002642007926023778, 'mean_word_length': 1.2362669816893088, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4887664', 'n_tokens_mistral': 1064, 'n_tokens_neox': 1001, 'n_words': 152}