From: Vadim Zeitlin Date: Wed, 13 Aug 2003 22:39:31 +0000 (+0000) Subject: check the week day for consistency in ParseFormat() (replaces patch 788052) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/88a036cef3585f9a6d23d074aadb2ebda0b73ff8 check the week day for consistency in ParseFormat() (replaces patch 788052) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index 56324c0d3d..b46997bbe6 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -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; }