moments.js 定义区域设置覆盖-Define Locale Override

2020-07-01T15:08:00

Define Locale Override


Use moment.updateLocale(localeName, config) to change an existing locale.
moment.defineLocale(localeName, config) should only be used for creating a new locale


moment.js 区域默认'en',日期以英文方式显示,修改区域即可显示中文时间

默认:
hooks.locale('en');
修改:
hooks.locale('zh-cn');

当前页面是本站的「Baidu MIP」版。发表评论请点击:完整版 »