fixed wxDateTime::GetWeekDayName() for wday > Wed (patch 998646)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28553 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2004-07-30 23:33:16 +00:00
parent 5402d21de1
commit 2c622d7178
2 changed files with 5 additions and 2 deletions

View File

@@ -817,10 +817,12 @@ wxString wxDateTime::GetWeekDayName(wxDateTime::WeekDay wday,
{
wxCHECK_MSG( wday != Inv_WeekDay, _T(""), _T("invalid weekday") );
// take some arbitrary Sunday
// take some arbitrary Sunday (but notice that the day should be such that
// after adding wday to it below we still have a valid date, e.g. don't
// take 28 here!)
tm tm;
InitTm(tm);
tm.tm_mday = 28;
tm.tm_mday = 21;
tm.tm_mon = Nov;
tm.tm_year = 99;