X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/223d09f6b523aac674ef9b72a883dfa8d37c5d4e..ecef04c293db3e3ebcdb12062fdc40b9b35c8c3e:/src/common/date.cpp diff --git a/src/common/date.cpp b/src/common/date.cpp index 476310692a..47a054d20a 100644 --- a/src/common/date.cpp +++ b/src/common/date.cpp @@ -291,7 +291,7 @@ ostream WXDLLEXPORT & operator << (ostream &os, const wxDate &dt) void wxDate::julian_to_wday (void) { // Correction by Peter Stadel - day_of_week = ((julian - 2) % 7L); + day_of_week = (int)((julian - 2) % 7L); /* day_of_week = (int) ((julian + 2) % 7 + 1); */ @@ -359,7 +359,7 @@ wxString wxDate::FormatDate (int type) const wxStrcpy(buf, _("invalid day")); else wxStrncpy( buf, wxGetTranslation(dayname[day_of_week-1]), - (DisplayOptions & wxDATE_ABBR) ? ABBR_LENGTH : 9); + (DisplayOptions & wxDATE_ABBR) ? ABBR_LENGTH : 9); return wxString(buf); case wxMONTH: @@ -367,7 +367,7 @@ wxString wxDate::FormatDate (int type) const wxStrcpy(buf, _("invalid month")); else wxStrncpy( buf, wxGetTranslation(mname[month-1]), - (DisplayOptions & wxDATE_ABBR) ? ABBR_LENGTH : 9); + (DisplayOptions & wxDATE_ABBR) ? ABBR_LENGTH : 9); return wxString(buf); case wxFULL: @@ -378,10 +378,10 @@ wxString wxDate::FormatDate (int type) const return wxString(buf); } wxStrncpy( buf, wxGetTranslation(dayname[day_of_week-1]), - (DisplayOptions & wxDATE_ABBR) ? ABBR_LENGTH : 9); + (DisplayOptions & wxDATE_ABBR) ? ABBR_LENGTH : 9); wxStrcat( buf, wxT(", ")); wxStrncat( buf, wxGetTranslation(mname[month-1]), - (DisplayOptions & wxDATE_ABBR) ? ABBR_LENGTH : 9); + (DisplayOptions & wxDATE_ABBR) ? ABBR_LENGTH : 9); wxStrcat( buf, wxT(" ")); wxSprintf( buf+wxStrlen(buf), wxT("%d, %d"), day, abs(year) ); if (year < 0) @@ -409,12 +409,11 @@ wxString wxDate::FormatDate (int type) const wxStrcpy(buf, _("invalid date")); else wxSprintf( buf+wxStrlen(buf), wxT("%1d/%1d/%02d"), month, day, - (DisplayOptions & wxNO_CENTURY) && (abs(year) > 1899) - ? (abs(year) - (abs(year) / 100 * 100)) - : (abs(year)) ); + (DisplayOptions & wxNO_CENTURY) && (abs(year) > 1899) + ? (abs(year) - (abs(year) / 100 * 100)) + : (abs(year)) ); return wxString(buf); } - return wxString(wxT("")); } void wxDate::SetFormat( int format ) @@ -445,7 +444,6 @@ int wxDate::SetOption( int option, bool action ) default: return 0; } - return 0; } ///////////////////////////////////////////////////////////////