X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/12f5e1e78fe906050ff2fee9529476db332633f0..5f9c4ae6263fe0e6698c826f7655ff803ffcbfd4:/interface/wx/datetime.h diff --git a/interface/wx/datetime.h b/interface/wx/datetime.h index c33ec22fb5..9505c3d9a6 100644 --- a/interface/wx/datetime.h +++ b/interface/wx/datetime.h @@ -248,13 +248,13 @@ public: This constructor is named "wxDateTimeFromTimeT" in wxPython. @endWxPythonOnly */ - wxDateTime& wxDateTime(time_t timet); + wxDateTime(time_t timet); /** Same as Set(). @beginWxPythonOnly Unsupported. @endWxPythonOnly */ - wxDateTime& wxDateTime(const struct tm& tm); + wxDateTime(const struct tm& tm); /** Same as Set(). @@ -262,7 +262,7 @@ public: This constructor is named "wxDateTimeFromJDN" in wxPython. @endWxPythonOnly */ - wxDateTime& wxDateTime(double jdn); + wxDateTime(double jdn); /** Same as Set(). @@ -270,8 +270,8 @@ public: This constructor is named "wxDateTimeFromHMS" in wxPython. @endWxPythonOnly */ - wxDateTime& wxDateTime(wxDateTime_t hour, wxDateTime_t minute = 0, - wxDateTime_t second = 0, wxDateTime_t millisec = 0); + wxDateTime(wxDateTime_t hour, wxDateTime_t minute = 0, + wxDateTime_t second = 0, wxDateTime_t millisec = 0); /** Same as Set(). @@ -350,7 +350,7 @@ public: /** Sets the day without changing other date components. */ - wxDateTime& SetDay(short unsigned int); + wxDateTime& SetDay(unsigned short day); /** Sets the date from the date and time in DOS format. @@ -360,17 +360,17 @@ public: /** Sets the hour without changing other date components. */ - wxDateTime& SetHour(short unsigned int); + wxDateTime& SetHour(unsigned short hour); /** Sets the millisecond without changing other date components. */ - wxDateTime& SetMillisecond(short unsigned int); + wxDateTime& SetMillisecond(unsigned short millisecond); /** Sets the minute without changing other date components. */ - wxDateTime& SetMinute(short unsigned int); + wxDateTime& SetMinute(unsigned short minute); /** Sets the month without changing other date components. @@ -380,7 +380,7 @@ public: /** Sets the second without changing other date components. */ - wxDateTime& SetSecond(short unsigned int); + wxDateTime& SetSecond(unsigned short second); /** Sets the date and time of to the current values. Same as assigning the @@ -746,7 +746,7 @@ public: @see ParseFormat() */ - wxString Format(const wxChar* format = wxDefaultDateTimeFormat, + wxString Format(const wxString& format = wxDefaultDateTimeFormat, const TimeZone& tz = Local) const; /** @@ -1104,8 +1104,7 @@ public: @return The reference to the modified object itself. */ - wxDateTime SetToLastMonthDay(Month month = Inv_Month, - int year = Inv_Year); + wxDateTime& SetToLastMonthDay(Month month = Inv_Month, int year = Inv_Year); /** The effect of calling this function is the same as of calling @@ -1155,7 +1154,7 @@ public: @return The reference to the modified object itself. */ - wxDateTime SetToWeekDayInSameWeek(WeekDay weekday, + wxDateTime& SetToWeekDayInSameWeek(WeekDay weekday, WeekFlags flags = Monday_First); /** @@ -1202,10 +1201,10 @@ public: /** Returns the @e "Modified Julian Day Number" (MJD) which is, by - definition, is equal to JDN - 2400000.5. The MJDs are simpler to work - with as the integral MJDs correspond to midnights of the dates in the - Gregorian calendar and not the noons like JDN. The MJD 0 represents - Nov 17, 1858. + definition, is equal to JDN - 2400000.5. + The MJDs are simpler to work with as the integral MJDs correspond to + midnights of the dates in the Gregorian calendar and not the noons like + JDN. The MJD 0 represents Nov 17, 1858. */ double GetModifiedJulianDayNumber() const; @@ -1251,13 +1250,13 @@ public: /** Same as FromTimezone() but modifies the object in place. */ - wxDateTime MakeFromTimezone(const TimeZone& tz, bool noDST = false); + wxDateTime& MakeFromTimezone(const TimeZone& tz, bool noDST = false); /** Modifies the object in place to represent the date in another time zone. If @a noDST is @true, no DST adjustments will be made. */ - wxDateTime MakeTimezone(const TimeZone& tz, bool noDST = false); + wxDateTime& MakeTimezone(const TimeZone& tz, bool noDST = false); /** This is the same as calling MakeTimezone() with the argument @c GMT0. @@ -1389,7 +1388,7 @@ public: Returns the current time broken down using the buffer whose adress is passed to the function with @a tm to store the result. */ - static struct tm* GetTmNow(struct tm *tm); + static tm* GetTmNow(struct tm *tm); /** Returns the current time broken down. Note that this function returns a @@ -1398,7 +1397,7 @@ public: your code might be used in a multi-threaded application, you really should use GetTmNow(struct tm *) instead. */ - static struct tm* GetTmNow(); + static tm* GetTmNow(); /** Gets the full (default) or abbreviated (specify @c Name_Abbr) name of @@ -1410,7 +1409,7 @@ public: NameFlags flags = Name_Full); /** - Returns @true if DST was used n the given year (the current one by + Returns @true if DST was used in the given year (the current one by default) in the given country. */ static bool IsDSTApplicable(int year = Inv_Year, @@ -1797,7 +1796,7 @@ public: date set to 0. Hours are not restricted to 0-24 range, neither are minutes, seconds or milliseconds. */ - wxTimeSpan(long hours, long min, long sec, long msec); + wxTimeSpan(long hours, long min = 0, wxLongLong sec = 0, wxLongLong msec = 0); /** Returns the absolute value of the timespan: does not modify the object. @@ -1819,12 +1818,12 @@ public: /** Returns the timespan for one day. */ - static wxTimespan Day(); + static wxTimeSpan Day(); /** Returns the timespan for the given number of days. */ - static wxTimespan Days(long days); + static wxTimeSpan Days(long days); /** Returns the string containing the formatted representation of the time @@ -1892,12 +1891,12 @@ public: /** Returns the timespan for one hour. */ - static wxTimespan Hour(); + static wxTimeSpan Hour(); /** Returns the timespan for the given number of hours. */ - static wxTimespan Hours(long hours); + static wxTimeSpan Hours(long hours); /** Returns @true if two timespans are equal. @@ -1936,22 +1935,22 @@ public: /** Returns the timespan for one millisecond. */ - static wxTimespan Millisecond(); + static wxTimeSpan Millisecond(); /** Returns the timespan for the given number of milliseconds. */ - static wxTimespan Milliseconds(long ms); + static wxTimeSpan Milliseconds(wxLongLong ms); /** Returns the timespan for one minute. */ - static wxTimespan Minute(); + static wxTimeSpan Minute(); /** Returns the timespan for the given number of minutes. */ - static wxTimespan Minutes(long min); + static wxTimeSpan Minutes(long min); /** Returns the product of this time span by @a n. @@ -1983,12 +1982,12 @@ public: /** Returns the timespan for one second. */ - static wxTimespan Second(); + static wxTimeSpan Second(); /** Returns the timespan for the given number of seconds. */ - static wxTimespan Seconds(long sec); + static wxTimeSpan Seconds(wxLongLong sec); /** Returns the difference of two time spans. @@ -2005,12 +2004,12 @@ public: /** Returns the timespan for one week. */ - static wxTimespan Week(); + static wxTimeSpan Week(); /** Returns the timespan for the given number of weeks. */ - static wxTimespan Weeks(long weeks); + static wxTimeSpan Weeks(long weeks); /** Adds the given wxTimeSpan to this wxTimeSpan and returns the result.