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 |
---|---|
1 | Addmoment.add() |
2 | Subtractmoment.subtract() |
3 | Start of Timemoment.startof() |
4 | End of Timemoment.endof() |
5 | Localmoment.local() |
6 | UTCmoment.utc() |
7 | UTC offsetmoment.utcOffset() |
Leave a Reply