]> git.saurik.com Git - wxWidgets.git/commitdiff
check the week day for consistency in ParseFormat() (replaces patch 788052)
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 13 Aug 2003 22:39:31 +0000 (22:39 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 13 Aug 2003 22:39:31 +0000 (22:39 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/datetime.cpp

index 56324c0d3da9fe60952fd8d5cd3dbbe43e0a6f5f..b46997bbe6771bab9821626b340cce36845fdf60 100644 (file)
@@ -3185,6 +3185,14 @@ const wxChar *wxDateTime::ParseFormat(const wxChar *date,
 
     Set(tm);
 
+    // finally check that the week day is consistent -- if we had it
+    if ( haveWDay && GetWeekDay() != wday )
+    {
+        wxLogDebug(_T("inconsistsnet week day in wxDateTime::ParseFormat()"));
+
+        return NULL;
+    }
+
     return input;
 }