X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a243da29c8135be476e47a035a81e695bbb21e26..63a6a75000ded502087a9e063569d1ce864951b9:/include/wx/datetime.h?ds=sidebyside diff --git a/include/wx/datetime.h b/include/wx/datetime.h index 2531c54686..286155f29f 100644 --- a/include/wx/datetime.h +++ b/include/wx/datetime.h @@ -462,7 +462,9 @@ public: // instead of modifying the member fields directly! struct WXDLLIMPEXP_BASE Tm { - wxDateTime_t msec, sec, min, hour, mday; + wxDateTime_t msec, sec, min, hour, + mday, // Day of the month in 1..31 range. + yday; // Day of the year in 0..365 range. Month mon; int year; @@ -497,9 +499,10 @@ public: // the timezone we correspond to TimeZone m_tz; - // these values can't be accessed directly because they're not always - // computed and we calculate them on demand - wxDateTime_t wday, yday; + // This value can only be accessed via GetWeekDay() and not directly + // because it's not always computed when creating this object and may + // need to be calculated on demand. + wxDateTime_t wday; }; // static methods @@ -947,12 +950,15 @@ public: // SYSTEMTIME format // ------------------------------------------------------------------------ #ifdef __WXMSW__ - // convert SYSTEMTIME to wxDateTime - wxDateTime& SetFromMSWSysTime(const struct _SYSTEMTIME&); + wxDateTime& SetFromMSWSysTime(const struct _SYSTEMTIME& st); // convert wxDateTime to SYSTEMTIME - void GetAsMSWSysTime(struct _SYSTEMTIME*) const; + void GetAsMSWSysTime(struct _SYSTEMTIME* st) const; + + // same as above but only take date part into account, time is always zero + wxDateTime& SetFromMSWSysDate(const struct _SYSTEMTIME& st); + void GetAsMSWSysDate(struct _SYSTEMTIME* st) const; #endif // __WXMSW__ // comparison (see also functions below for operator versions)