1
我有一个基于用户偏好的全局区域设置变量。当我将该变量与时间戳一起传递到时刻时,它仍然以英文显示日期。我希望它以该区域设置的通用格式显示日期。例如:使用momentjs在特定区域设置日期格式
moment.locale('fr');
console.log(moment(867283200, "X").format('LL')); //still outputs June 25, 1997 when it should be using French months
有什么建议吗?
这会有帮助吗? http://momentjs.com/docs/#/i18n/loading-into-browser/ – 2014-08-29 18:24:10
解决了这个问题,谢谢!我只需要在本地包含它。 – Sara 2014-08-29 18:28:45
没问题。你应该把答案标记为正确的:) – 2014-09-01 20:38:13