]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/datetime.cpp
fix wxChar error in docs
[wxWidgets.git] / src / common / datetime.cpp
index 71c1c95a8f9986de0445934055ddfc766980b116..7ff53bacf56e6ddaf64207e2bf2ce0cab2b73bca 100644 (file)
@@ -13,7 +13,7 @@
 //               so long as the above copyright and this permission statement
 //               are retained in all copies.
 //
-// Licence:     wxWindows license
+// Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 
 /*
@@ -82,6 +82,8 @@
 #include "wx/datetime.h"
 #include "wx/timer.h"           // for wxGetLocalTimeMillis()
 
+const long wxDateTime::TIME_T_FACTOR = 1000l;
+
 // ----------------------------------------------------------------------------
 // conditional compilation
 // ----------------------------------------------------------------------------
     #undef HAVE_STRPTIME
 #endif // broken strptime()
 
+#if defined(__MWERKS__) && wxUSE_UNICODE
+    #include <wtime.h>
+#endif
+
 #if !defined(WX_TIMEZONE) && !defined(WX_GMTOFF_IN_TM)
     #if defined(__BORLANDC__) || defined(__MINGW32__) || defined(__VISAGECPP__)
         #define WX_TIMEZONE _timezone
@@ -3237,7 +3243,7 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date)
 
     // tokenize the string
     size_t nPosCur = 0;
-    static const wxChar *dateDelimiters = _T(".,/-\t\n ");
+    static const wxChar *dateDelimiters = _T(".,/-\t\r\n ");
     wxStringTokenizer tok(p, dateDelimiters);
     while ( tok.HasMoreTokens() )
     {
@@ -3524,7 +3530,8 @@ const wxChar *wxDateTime::ParseTime(const wxChar *time)
         size_t len = timeString.length();
         if ( timeString.CmpNoCase(wxString(time, len)) == 0 )
         {
-            Set(stdTimes[n].hour, 0, 0);
+            // casts required by DigitalMars
+            Set(stdTimes[n].hour, wxDateTime_t(0), wxDateTime_t(0));
 
             return time + len;
         }