Created
April 9, 2012 17:38
-
-
Save maxparm/2344922 to your computer and use it in GitHub Desktop.
JS - Validate Date mm/dd/yyyy
This file contains 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
function isDate(date) { | |
return /^(0[1-9]|1[012])[- \/\/.](0[1-9]|[12][0-9]|3[01])[- \/\/.](19|20)\d\d$/.test(date); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment