From: Steve Brokenshire Date: Sun, 26 Jun 2016 10:11:36 +0000 (+0100) Subject: Corrected code for generating the month view grid in leap years. X-Git-Tag: release-0.02~114 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=99841eedeea3117b5d432f52cf920a3b5d0c8ba5;p=xestiacalendar%2F.git Corrected code for generating the month view grid in leap years. --- diff --git a/source/common/monthviewgen.cpp b/source/common/monthviewgen.cpp index f1bd702..f267b84 100644 --- a/source/common/monthviewgen.cpp +++ b/source/common/monthviewgen.cpp @@ -221,13 +221,13 @@ XCCalendarMonthViewGrid GenerateMonthGrid(int Month, int Year){ } - if (Month == 2 && ProcessDay == 28){ - + if (Month == 2 && ProcessDay == 29){ + break; } - } else if (Month == 2 && ProcessDay == 28){ + } else if ((Month == 2 && ProcessDay == 28) && Year % 4 != 0){ break;