Created
February 4, 2015 09:33
-
-
Save dancourse/50060765981ce204f292 to your computer and use it in GitHub Desktop.
Momentjs isAfter is always returning false "bug"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Not quite the solution, but it works so I can move on! | |
// CHANGEME: a date to test against, change it to something you want | |
var dateToTest = moment('2015-02-04 08:00:00').valueOf(); | |
// now | |
var now = moment().valueOf(); | |
// use a "greater than" eval, rather than isAfter | |
var x = dateToTest > now; | |
console.log('isAfterTest', now, '>', dateToTest, x); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment