From 495d64ce3940a73b3173497c3e568e2d73bf231d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 15 Dec 2007 21:03:21 +0000 Subject: [PATCH] don't misinterpret the time after the date as a weekday (patch 1836708) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@50732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 4 ++++ src/common/datetime.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 7501f27815..d0e4f6b901 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -91,6 +91,10 @@ Major new features in 2.8 release 2.8.8 ----- +All: + +- Fixed bug with parsing some dates in wxDateTime (Bob Pesner) + All (GUI): - Added wxWindow::GetNextSibling() and GetPrevSibling(). diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index 5af721c433..c7f2fd6b33 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -3992,8 +3992,8 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date) } else // not a valid month name { - wday = GetWeekDayFromName(token, Name_Full | Name_Abbr); - if ( wday != Inv_WeekDay ) + WeekDay wday2 = GetWeekDayFromName(token, Name_Full | Name_Abbr); + if ( wday2 != Inv_WeekDay ) { // a week day if ( haveWDay ) @@ -4001,6 +4001,8 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date) break; } + wday = wday2; + haveWDay = true; } else // not a valid weekday name