Created
May 13, 2015 19:10
-
-
Save hamiltondanielb/0ed7e0f6d6a93afb5143 to your computer and use it in GitHub Desktop.
ES6 Date isEqual to ES5
This file contains hidden or 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
Date.prototype.isEqual = Date.prototype.isEqual || function(other) { | |
if (other && typeof other.getTime === 'function') { | |
return this.getTime() === other.getTime(); | |
} else { | |
return false; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment