]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/datetime.cpp
give the panel 3D grey colour by default: as it's not a native control, we must give...
[wxWidgets.git] / src / common / datetime.cpp
index 1e84f0689cf73e71fd46dd61077866e3aa5d04b8..9c14cc43db07e0f51dca7e3d9af7db60f48f9577 100644 (file)
@@ -1326,6 +1326,7 @@ wxDateTime& wxDateTime::ResetTime()
 wxDateTime& wxDateTime::SetFromDOS(unsigned long ddt)
 {
     struct tm tm;
+    InitTm(tm);
 
     long year = ddt & 0xFE000000;
     year >>= 25;
@@ -1886,7 +1887,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);