Created
September 6, 2012 22:41
-
-
Save krunkosaurus/3660961 to your computer and use it in GitHub Desktop.
hasLeapYear
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 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