MomentJS - 操纵日期和时间

MomentJS 提供了各种方法来操作时刻对象的日期和时间.本章详细介绍了所有这些方法.

操纵日期和时间的方法

下表显示了MomentJS中可用的方法,它们有助于根据需要操纵日期和时间:

Sr.No.Method & Syntax
1Add

moment.add()

2Subtract

moment.subtract()

3Start of Time

moment.startof()

4End of Time

moment.endof()

5Local

moment.local()

6UTC

moment.utc()

7UTC offset

moment.utcOffset()