From 88a036cef3585f9a6d23d074aadb2ebda0b73ff8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 13 Aug 2003 22:39:31 +0000 Subject: [PATCH] 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 --- src/common/datetime.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) 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; } -- 2.50.0