I'm trying to write an if
statement that runs some code if the date is after April 24th, 2017, 10 am EDT, but it doesn't appear that my variables are comparable (different data types?).
I'm trying to avoid using Moment.js for just this.
var today = new Date();
var launch = 'Mon Apr 24 2017 10:00:00 GMT-0400 (EDT)';
today
returns Tue Apr 04 2017 14:34:41 GMT-0400 (EDT)
.
When I test if either is greater than the other, both are false. How should I format my dates?
Thanks!