Created
August 14, 2012 15:22
-
-
Save scan/3350249 to your computer and use it in GitHub Desktop.
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
function dateCheck(year, month, day) { | |
var mon = month - 1; | |
var date = new Date(year, mon, day); | |
if(day !== date.getDate() || mon !== (date.getMonth()) || year !== (1900 + date.getYear())) { | |
return false; | |
} | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment