Thursday, 15 September 2011

Time opertions using MomentJS -



Time opertions using MomentJS -

i have fixed date string, append time it. 1 current time , other current time + 1 hour

is possible using momentjs.

ex:

var startdate = moment("10/1/2014");

now build new date startdate time (logic mentioned above)

as pointed rc, can this:

var = moment(); var plushour = moment().add(1, 'h');

you can format like:

console.log(plushour.format("yyyy-mm-dd h:m:s"))

momentjs

No comments:

Post a Comment