Subtract or adding days, months or years in Javascript (using momentjs’ website)

Subtract or adding days, months or years in Javascript (using momentjs’ website)


Sometimes I just want to test a few lines to subtract or add days, months or years to a date without needing to include a script element that links to a local file or a cdn somewhere.

Well, its quite easy and simple. Just go to http://momentjs.com, press F12 if you’re using Google Ultron and type away.

subtract or add dates

+ There are no comments

Add yours