Skip to content

Instantly share code, notes, and snippets.

@hamiltondanielb
Created May 13, 2015 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hamiltondanielb/0ed7e0f6d6a93afb5143 to your computer and use it in GitHub Desktop.
Save hamiltondanielb/0ed7e0f6d6a93afb5143 to your computer and use it in GitHub Desktop.
ES6 Date isEqual to ES5
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