From f49d731fd4dc46cf729e3f9f4397d6080ee6d0dd Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 21 Oct 2003 23:00:37 +0000 Subject: [PATCH] fix for wxDateTime::SetToYearDay(last month day) (bug 816065) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24243 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/datetime.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index 1e84f0689c..7ea7a574e3 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -1886,7 +1886,7 @@ wxDateTime& wxDateTime::SetToYearDay(wxDateTime::wxDateTime_t yday) // for Dec, we can't compare with gs_cumulatedDays[mon + 1], but we // don't need it neither - because of the CHECK above we know that // yday lies in December then - if ( (mon == Dec) || (yday < gs_cumulatedDays[isLeap][mon + 1]) ) + if ( (mon == Dec) || (yday <= gs_cumulatedDays[isLeap][mon + 1]) ) { Set(yday - gs_cumulatedDays[isLeap][mon], mon, year);