You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When nothing has been selected yet, the method getSelectedDay() (in CollapsibleCalendar) will return a Day object created with the day, month & year from Calendar, but with month, a +1 is added. This is inconsistent since the normal value when something is selected does not do a +1.
Calendar.get(2) returns the month starting from 0 - 11. With the +1, it changes to 1-12.
So: when nothing in calendar has been clicked yet, day.getMonth() returns 4. When I then click on the day of today, that day gets selected. Then day.getMonth() prints out 3. (day == getSelectedDay())
Recommendation:
In CollapsibleCalendar in getSelectedDay() change: return new Day(year, month + 1, day);
to: return new Day(year, month, day);
The text was updated successfully, but these errors were encountered:
When nothing has been selected yet, the method getSelectedDay() (in CollapsibleCalendar) will return a Day object created with the day, month & year from Calendar, but with month, a +1 is added. This is inconsistent since the normal value when something is selected does not do a +1.
Calendar.get(2) returns the month starting from 0 - 11. With the +1, it changes to 1-12.
So: when nothing in calendar has been clicked yet, day.getMonth() returns 4. When I then click on the day of today, that day gets selected. Then day.getMonth() prints out 3. (day == getSelectedDay())
Recommendation:
In CollapsibleCalendar in getSelectedDay() change:
return new Day(year, month + 1, day);
to:
return new Day(year, month, day);
The text was updated successfully, but these errors were encountered: