Has anybody ever used moment before? http://momentjs.com/
It seems like an easy way to manipulate dates.
I am trying to add days to a date I get from a sharePoint list but it's not working like I expect.
i think my syntax is wrong and I can't find anything on their site about how to do this.
var nextDate = moment().add('days', 6).calendar(dte);
The first alert shows the date being passed in but then the 2nd alert shows this..
"nxDte: Thursday at 11:17 AM".
It shows that for all the dates.
When I tried it this way
var nextDate = moment(dte).add('days', 6);
My alert produced the folllwoing: "1349841600000" but the values were different for each date
Any ideas or how I can add 6 days to any date?