Skip to content

Instantly share code, notes, and snippets.

@jakeboxer
Last active March 29, 2016 12:40
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakeboxer/6043093 to your computer and use it in GitHub Desktop.
Save jakeboxer/6043093 to your computer and use it in GitHub Desktop.
lol javascript
var dateValue = 504001800000; // Saturday, December 21st, 1985 at 3:30am EST
var date1 = new Date(dateValue);
var date2 = new Date(dateValue);
console.log(date1 == date2); // false (different instances)
console.log(date1 === date2); // false (different instances)
console.log(date1 > date2); // false (date1 is not later than date2)
console.log(date1 < date2); // false (date1 is not earlier than date2)
console.log(date1 >= date2); // true (rofl)
console.log(date1 <= date2); // true (ahahahaha)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment