UNPKG

453 BJavaScriptView Raw
1export default (function (option, Dayjs, dayjs) {
2 dayjs.updateLocale = function (locale, customConfig) {
3 var localeList = dayjs.Ls;
4 var localeConfig = localeList[locale];
5 if (!localeConfig) return;
6 var customConfigKeys = customConfig ? Object.keys(customConfig) : [];
7 customConfigKeys.forEach(function (c) {
8 localeConfig[c] = customConfig[c];
9 });
10 return localeConfig; // eslint-disable-line consistent-return
11 };
12});
\No newline at end of file