Last active
August 5, 2016 03:39
-
-
Save preco21/b8a015ffa682faa0914b7f0724bc01fc to your computer and use it in GitHub Desktop.
Get leap year days
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 getYearDays(year) { | |
const isLeapYear = (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; | |
return isLeapYear ? 366 : 365; | |
} | |
export { | |
getYearDays as default, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment