Moment.js圆满结束 [英] Moment.js round dates up
本文介绍了Moment.js圆满结束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的javascript中,图书馆Moment.js使我的日期变化。
In my javascript the library Moment.js rounds my dates up.
Date: 2015-02-09T23:00:00.000Z
moment(Date).format('DD/MM'); ==> Becomes 10/02
我想要09/02结果。有没有可能的方法,图书馆不会绕过日期?
I want 09/02 as result. Is there a possible way that the library not rounds the date?
推荐答案
你可以试试如下。
moment(Date,['YYYY-MM-DD']).format('DD/MM');
这篇关于Moment.js圆满结束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文