Manipulate Date and Time

MomentJSprovides various methods to manipulate Date and Time on the moment object. This chapter deal with all such methods in detail.

Methods to Manipulate Date and Time

The following table shows the methods available in MomentJS which helps in manipulating the Date and Time as required −

Sr.No.Method & Syntax
1Addmoment.add()
2Subtractmoment.subtract()
3Start of Timemoment.startof()
4End of Timemoment.endof()
5Localmoment.local()
6UTCmoment.utc()
7UTC offsetmoment.utcOffset()

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *