Skip to content

Instantly share code, notes, and snippets.

@scan
Created August 14, 2012 15:22
Show Gist options
  • Save scan/3350249 to your computer and use it in GitHub Desktop.
Save scan/3350249 to your computer and use it in GitHub Desktop.
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