Thursday, October 31, 2013

the objects moment.js makes are not JavaScript date objects

Cast them back to plain Jane dates like so:

var lastHalloween = moment().subtract('year', 1).toDate();

No comments:

Post a Comment