Skip to content

Instantly share code, notes, and snippets.

@IOIO72
Created June 13, 2019 09:59
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 IOIO72/3909d28e68632767d22b047e01386cf2 to your computer and use it in GitHub Desktop.
Save IOIO72/3909d28e68632767d22b047e01386cf2 to your computer and use it in GitHub Desktop.
Returns true or false depending on valid date object.
export const isValidDate = d => d instanceof Date && !isNaN(d);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment