Skip to content

Instantly share code, notes, and snippets.

@krunkosaurus
Created September 6, 2012 22:41
Show Gist options
  • Save krunkosaurus/3660961 to your computer and use it in GitHub Desktop.
Save krunkosaurus/3660961 to your computer and use it in GitHub Desktop.
hasLeapYear
function hasLeapYear(year){
if (year % 400 === 0){
return true;
}else if (year % 100 === 0){
return false;
}else if (year % 4 === 0){
return true;
}else{
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment