X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/33ac7e6f01acbac1cff0ad400d8ea7f0bfd0a62f..9398120d298d745763f253d87d774be3b134b43f:/include/wx/datetime.h?ds=sidebyside diff --git a/include/wx/datetime.h b/include/wx/datetime.h index 55484c7b47..ad0755da66 100644 --- a/include/wx/datetime.h +++ b/include/wx/datetime.h @@ -17,6 +17,8 @@ #pragma interface "datetime.h" #endif +#if wxUSE_DATETIME + #include #include // for INT_MIN @@ -42,12 +44,12 @@ class WXDLLEXPORT wxDateSpan; #ifdef __WXMAC__ #if __MSL__ < 0x6000 - #define WX_TIME_BASE_OFFSET ( 2082844800L + 126144000L ) + #define WX_TIME_BASE_OFFSET ( 2082844800L + 126144000L ) #else - #define WX_TIME_BASE_OFFSET 0 + #define WX_TIME_BASE_OFFSET 0 #endif #else - #define WX_TIME_BASE_OFFSET 0 + #define WX_TIME_BASE_OFFSET 0 #endif /* * TODO @@ -113,7 +115,7 @@ class WXDLLEXPORT wxDateSpan; // wxInvalidDateTime) class WXDLLEXPORT wxDateTime; -WXDLLEXPORT_DATA(extern const wxDateTime&) wxDefaultDateTime; +WXDLLEXPORT_DATA(extern const wxDateTime) wxDefaultDateTime; #define wxInvalidDateTime wxDefaultDateTime // ---------------------------------------------------------------------------- @@ -539,7 +541,7 @@ public: // ------------------------------------------------------------------------ // default ctor does not initialize the object, use Set()! - wxDateTime() { } + wxDateTime() { m_time = wxLongLong((long)ULONG_MAX, ULONG_MAX); } // from time_t: seconds since the Epoch 00:00:00 UTC, Jan 1, 1970) #if (!(defined(__VISAGECPP__) && __IBMCPP__ >= 400)) @@ -773,8 +775,7 @@ public: // result of timezone shift) // ------------------------------------------------------------------------ - // is the date valid? Note that this will return TRUE for non - // initialized objects but FALSE if *this == wxInvalidDateTime + // is the date valid? inline bool IsValid() const { return m_time != wxInvalidDateTime.m_time; } // get the broken down date/time representation in the given timezone @@ -1571,4 +1572,6 @@ inline WXDLLEXPORT void wxPrevWDay(wxDateTime::WeekDay& wd) : (wxDateTime::WeekDay)(wd - 1); } +#endif // wxUSE_DATETIME + #endif // _WX_DATETIME_H