Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

century year handling #4

Closed
nickolas1 opened this issue Jan 5, 2021 · 2 comments
Closed

century year handling #4

nickolas1 opened this issue Jan 5, 2021 · 2 comments

Comments

@nickolas1
Copy link

Hi there,

the handling of century years seems to be not quite correct- they should only be leap years if they are divisible by 400, so 1900 and 2100 are not leap years, while 2000 is. I believe this could be fixed with a change like this to daysInMonth:

return (month === 2 && year % 4 === 0 && (year % 100 === 0 ? year % 400 === 0 : true)) ? 29 : days[month - 1];

@anveshkolluri93
Copy link
Owner

anveshkolluri93 commented May 22, 2021

please, feel free to open a PR for this if you want to contribute. I will be a bit late to given my current timeline. thanks

@anveshkolluri93
Copy link
Owner

#10 This issue has been addressed. Please, use the updated version of the package to get the updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants