mkm
/
yanzhiAPP
Template
2
0
Fork 0
yanzhiAPP/node_modules/dayjs/esm/plugin/updateLocale/index.js

12 lines
453 B
JavaScript
Raw Normal View History

2023-10-17 16:02:55 +08:00
export default (function (option, Dayjs, dayjs) {
dayjs.updateLocale = function (locale, customConfig) {
var localeList = dayjs.Ls;
var localeConfig = localeList[locale];
if (!localeConfig) return;
var customConfigKeys = customConfig ? Object.keys(customConfig) : [];
customConfigKeys.forEach(function (c) {
localeConfig[c] = customConfig[c];
});
return localeConfig; // eslint-disable-line consistent-return
};
});