X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f3f2e255b420523408496ba01844f9854373834e..f9d6e4e454ac06b3303c71081b289152c8867ec1:/include/wx/datetime.h diff --git a/include/wx/datetime.h b/include/wx/datetime.h index c648073ed8..7677de54ed 100644 --- a/include/wx/datetime.h +++ b/include/wx/datetime.h @@ -17,11 +17,11 @@ #if wxUSE_DATETIME -#ifndef __WXWINCE__ -#include -#else -#include "wx/msw/wince/time.h" -#endif +#ifdef __WXWINCE__ + #include "wx/msw/wince/time.h" +#elif !defined(__WXPALMOS5__) + #include +#endif // OS #include // for INT_MIN @@ -1128,21 +1128,21 @@ public: // provide compatibility overloads for them bool ParseISODate(const wxString& date) { - const wxStringCharType *p = ParseFormat(date, wxS("%Y-%m-%d")); - return p && !*p; + wxString::const_iterator end; + return ParseFormat(date, wxS("%Y-%m-%d"), &end) && end == date.end(); } - bool ParseISOTime(const wxString& date) + bool ParseISOTime(const wxString& time) { - const wxStringCharType *p = ParseFormat(date, wxS("%H:%M:%S")); - return p && !*p; + wxString::const_iterator end; + return ParseFormat(time, wxS("%H:%M:%S"), &end) && end == time.end(); } - bool ParseISOCombined(const wxString& date, char sep = 'T') + bool ParseISOCombined(const wxString& datetime, char sep = 'T') { + wxString::const_iterator end; const wxString fmt = wxS("%Y-%m-%d") + wxString(sep) + wxS("%H:%M:%S"); - const wxStringCharType *p = ParseFormat(date, fmt.wx_str()); - return p && !*p; + return ParseFormat(datetime, fmt, &end) && end == datetime.end(); } // parse a string containing the date/time in "free" format, this