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

wrong days number in February in leap year #12

Open
semenoh opened this issue Jan 15, 2015 · 1 comment
Open

wrong days number in February in leap year #12

semenoh opened this issue Jan 15, 2015 · 1 comment

Comments

@semenoh
Copy link

semenoh commented Jan 15, 2015

Hi, I notice one thing which is probably related to days count in February when it is not leap year.
For instance February 2015 ends with Sunday 29th and March begins with Sunday 1st. First thing was that March should start with Monday 1st but 2015 is not leap year so February should ends with Saturday 28th.

P.S. I have screenshot by I don't know how to attach it here.

UPD:

CalendarUtils class contains line:

return ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) ? 28 : 29;

which means that leap year contain 28 and regular 29 days.
Just switch 28 and 29 like this

return ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) ? 29 : 28;
@msunshinelxl
Copy link

I find the same bug

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