X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/400930d3445bd8d8745c621b9ad0b352433db622..825842b41196b5e0017debc4dba85367f76b3c0c:/interface/wx/datetime.h diff --git a/interface/wx/datetime.h b/interface/wx/datetime.h index 950ac809e8..b517d4d882 100644 --- a/interface/wx/datetime.h +++ b/interface/wx/datetime.h @@ -9,7 +9,7 @@ /** @class wxDateTime - wxDateTime class represents an absolute moment in the time. + wxDateTime class represents an absolute moment in time. The type @c wxDateTime_t is typedefed as unsigned short and is used to contain the number of years, hours, minutes, seconds and @@ -438,6 +438,12 @@ public: object later. */ wxDateTime(); + + /** + Copy constructor. + */ + wxDateTime(const wxDateTime& date); + /** Same as Set(). @@ -476,7 +482,7 @@ public: This constructor is named "wxDateTimeFromDMY" in wxPython. @endWxPythonOnly */ - wxDateTime(wxDateTime_t day, Month month = Inv_Month, + wxDateTime(wxDateTime_t day, Month month, int year = Inv_Year, wxDateTime_t hour = 0, wxDateTime_t minute = 0, wxDateTime_t second = 0, wxDateTime_t millisec = 0); @@ -488,6 +494,7 @@ public: Input, Windows SYSTEMTIME reference @since 2.9.0 @remarks MSW only + @onlyfor{wxmsw} */ wxDateTime(const struct _SYSTEMTIME& st); @@ -513,6 +520,13 @@ public: @beginWxPythonOnly Unsupported. @endWxPythonOnly */ wxDateTime& Set(const struct tm& tm); + + /** + Sets the date and time from the broken down representation in the + @a wxDateTime::Tm structure. + */ + wxDateTime& Set(const Tm& tm); + /** Sets the date from the so-called Julian Day Number. @@ -539,7 +553,7 @@ public: /** Sets the date and time from the parameters. */ - wxDateTime& Set(wxDateTime_t day, Month month = Inv_Month, + wxDateTime& Set(wxDateTime_t day, Month month, int year = Inv_Year, wxDateTime_t hour = 0, wxDateTime_t minute = 0, wxDateTime_t second = 0, wxDateTime_t millisec = 0); @@ -615,7 +629,7 @@ public: /** Returns the date and time in DOS format. */ - long unsigned int GetAsDOS() const; + unsigned long GetAsDOS() const; /** Initialize using the Windows SYSTEMTIME structure. @@ -623,6 +637,7 @@ public: Input, Windows SYSTEMTIME reference @since 2.9.0 @remarks MSW only + @onlyfor{wxmsw} */ wxDateTime& SetFromMSWSysTime(const struct _SYSTEMTIME& st); @@ -632,6 +647,7 @@ public: Output, pointer to Windows SYSTEMTIME @since 2.9.0 @remarks MSW only + @onlyfor{wxmsw} */ void GetAsMSWSysTime(struct _SYSTEMTIME* st) const; @@ -653,28 +669,28 @@ public: /** Returns the day in the given timezone (local one by default). */ - short unsigned int GetDay(const TimeZone& tz = Local) const; + unsigned short GetDay(const TimeZone& tz = Local) const; /** Returns the day of the year (in 1-366 range) in the given timezone (local one by default). */ - short unsigned int GetDayOfYear(const TimeZone& tz = Local) const; + unsigned short GetDayOfYear(const TimeZone& tz = Local) const; /** Returns the hour in the given timezone (local one by default). */ - short unsigned int GetHour(const TimeZone& tz = Local) const; + unsigned short GetHour(const TimeZone& tz = Local) const; /** Returns the milliseconds in the given timezone (local one by default). */ - short unsigned int GetMillisecond(const TimeZone& tz = Local) const; + unsigned short GetMillisecond(const TimeZone& tz = Local) const; /** Returns the minute in the given timezone (local one by default). */ - short unsigned int GetMinute(const TimeZone& tz = Local) const; + unsigned short GetMinute(const TimeZone& tz = Local) const; /** Returns the month in the given timezone (local one by default). @@ -684,7 +700,7 @@ public: /** Returns the seconds in the given timezone (local one by default). */ - short unsigned int GetSecond(const TimeZone& tz = Local) const; + unsigned short GetSecond(const TimeZone& tz = Local) const; /** Returns the number of seconds since Jan 1, 1970. An assert failure will @@ -904,7 +920,7 @@ public: /** Adds the given date span to this object. */ - wxDateTime operator+=(const wxDateSpan& diff); + wxDateTime& operator+=(const wxDateSpan& diff); /** Subtracts the given date span from this object. */ @@ -1912,7 +1928,7 @@ public: /** Returns @true if this date span is different from the other one. */ - bool operator!=(const wxDateSpan&) const; + bool operator!=(const wxDateSpan& other) const; /** Returns @true if this date span is equal to the other one. Two date @@ -1920,7 +1936,7 @@ public: years and months and the same total number of days (counting both days and weeks). */ - bool operator==(const wxDateSpan&) const; + bool operator==(const wxDateSpan& other) const; }; @@ -2002,7 +2018,7 @@ public: specifier of larger unit, only the rest part is taken, otherwise the full value is used. */ - wxString Format(const wxString& = wxDefaultTimeSpanFormat) const; + wxString Format(const wxString& format = wxDefaultTimeSpanFormat) const; /** Returns the difference in number of days.