CalendarListview
CalendarListview copied to clipboard
wrong days number in February in leap year
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;
I find the same bug