#pragma interface "datetime.h"
#endif
+#if wxUSE_DATETIME
+
#include <time.h>
#include <limits.h> // for INT_MIN
#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
// ------------------------------------------------------------------------
// 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))
wxDateTime_t millisec = 0);
// from separate values for each component with explicit date
inline wxDateTime(wxDateTime_t day, // day of the month
- Month month = Inv_Month,
+ Month month,
int year = Inv_Year, // 1999, not 99 please!
wxDateTime_t hour = 0,
wxDateTime_t minute = 0,
// from separate values for each component with explicit date
// (defaults for month and year are the current values)
wxDateTime& Set(wxDateTime_t day,
- Month month = Inv_Month,
+ Month month,
int year = Inv_Year, // 1999, not 99 please!
wxDateTime_t hour = 0,
wxDateTime_t minute = 0,
// 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
: (wxDateTime::WeekDay)(wd - 1);
}
+#endif // wxUSE_DATETIME
+
#endif // _WX_DATETIME_H