Created
December 20, 2018 12:52
-
-
Save aykutyaman/46bf31dd8276c25eb783cad65e9f6716 to your computer and use it in GitHub Desktop.
check if a date is valid or not
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
// isValid -> Date -> Bool | |
const isValidDate = d => d instanceof Date && !isNaN(d.getTime()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment