if (config != null) {
var locale, tmpLocale, parentConfig = baseConfig;
// MERGE
- tmpLocale = locales[name] || loadLocale(name);
+ tmpLocale = loadLocale(name);
if (tmpLocale != null) {
parentConfig = tmpLocale._config;
}
});
assert.ok(moment.utc('2015-01-01', 'YYYY-MM-DD').format('MMMM'), 'First', 'months uses child');
});
+
+test('update existing locale', function (assert) {
+ moment.updateLocale('de', {
+ monthsShort: ['JAN', 'FEB', 'MÄR', 'APR', 'MAI', 'JUN', 'JUL', 'AUG', 'SEP', 'OKT', 'NOV', 'DEZ']
+ });
+ assert.equal(moment('2017-02-01').format('YYYY MMM MMMM'), '2017 FEB Februar');
+ moment.updateLocale('de', null);
+});