X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f17ac57417530febd2c48bbb6c82004cb23d108c..87f0b1323b7ac77f02133b836c8dfee63b0fd387:/src/common/datetimefmt.cpp?ds=inline diff --git a/src/common/datetimefmt.cpp b/src/common/datetimefmt.cpp index 698749f2c9..fda6c0ad52 100644 --- a/src/common/datetimefmt.cpp +++ b/src/common/datetimefmt.cpp @@ -293,7 +293,7 @@ ParseFormatAt(wxString::const_iterator& p, wxDateTime dt; // Use a default date outside of the DST period to avoid problems with - // parsing the time differently depending on the todays date (which is used + // parsing the time differently depending on the today's date (which is used // as the fall back date if none is explicitly specified). static const wxDateTime dtDef(1, wxDateTime::Jan, 2012); @@ -514,7 +514,7 @@ wxString wxDateTime::Format(const wxString& formatp, const TimeZone& tz) const // (indirectly) set the year correctly while ( (nLostWeekDays % 7) != 0 ) { - nLostWeekDays += year++ % 4 ? 1 : 2; + nLostWeekDays += (year++ % 4) ? 1 : 2; } // finally move the year below 2000 so that the 2-digit @@ -1725,12 +1725,12 @@ wxDateTime::ParseDate(const wxString& date, wxString::const_iterator *end) if ( len > lenRest ) continue; - const wxString::const_iterator pEnd = p + len; - if ( wxString(p, pEnd).CmpNoCase(dateStr) == 0 ) + const wxString::const_iterator pEndStr = p + len; + if ( wxString(p, pEndStr).CmpNoCase(dateStr) == 0 ) { // nothing can follow this, so stop here - p = pEnd; + p = pEndStr; int dayDiffFromToday = literalDates[n].dayDiffFromToday; *this = Today(); @@ -1739,7 +1739,7 @@ wxDateTime::ParseDate(const wxString& date, wxString::const_iterator *end) *this += wxDateSpan::Days(dayDiffFromToday); } - *end = pEnd; + *end = pEndStr; return true; }