X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/526954c5968baa29218c994ec48e476ae2bd4b9f..164db92c14e9f1a7343259826da3653aeec945db:/interface/wx/datetime.h diff --git a/interface/wx/datetime.h b/interface/wx/datetime.h index 57b329a86d..ab0adf6e59 100644 --- a/interface/wx/datetime.h +++ b/interface/wx/datetime.h @@ -244,6 +244,42 @@ public: }; + /** + Contains broken down date-time representation. + + This struct is analogous to standard C struct tm and uses + the same, not always immediately obvious, conventions for its members: + notably its mon and mday fields count from 0 while yday counts from 1. + */ + struct Tm + { + wxDateTime_t msec, ///< Number of milliseconds. + sec, ///< Seconds in 0..59 (60 with leap seconds) range. + min, ///< Minutes in 0..59 range. + hour, ///< Hours since midnight in 0..23 range. + mday, ///< Day of the month in 1..31 range. + yday; ///< Day of the year in 0..365 range. + Month mon; ///< Month, as an enumerated constant. + int year; ///< Year. + + /** + Check if the given date/time is valid (in Gregorian calendar). + + Return @false if the components don't correspond to a correct date. + */ + bool IsValid() const; + + /** + Return the week day corresponding to this date. + + Unlike the other fields, the week day is not always available and + so must be accessed using this method as it is computed on demand + when it is called. + */ + WeekDay GetWeekDay(); + }; + + /** @name Constructors, Assignment Operators and Setters @@ -1463,6 +1499,10 @@ public: */ const wxDateTime wxDefaultDateTime; +/* + wxInvalidDateTime is an alias for wxDefaultDateTime. +*/ +#define wxInvalidDateTime wxDefaultDateTime /**