X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/994453b843b007de6367fedbf4a49ac9d920c63c..26ee65c723cf55822c540506f064ec11d9b26858:/wxPython/src/_datetime.i diff --git a/wxPython/src/_datetime.i b/wxPython/src/_datetime.i index 41786ff186..4eb0162dd1 100644 --- a/wxPython/src/_datetime.i +++ b/wxPython/src/_datetime.i @@ -78,7 +78,7 @@ public: GMT_6, GMT_5, GMT_4, GMT_3, GMT_2, GMT_1, GMT0, GMT1, GMT2, GMT3, GMT4, GMT5, GMT6, - GMT7, GMT8, GMT9, GMT10, GMT11, GMT12, + GMT7, GMT8, GMT9, GMT10, GMT11, GMT12, GMT13, // Europe WET = GMT0, // Western Europe Time @@ -108,10 +108,14 @@ public: // Australia A_WST = GMT8, // Western Standard Time - A_CST = GMT12 + 1, // Central Standard Time (+9.5) + A_CST = GMT13 + 1, // Central Standard Time (+9.5) A_EST = GMT10, // Eastern Standard Time A_ESST = GMT11, // Eastern Summer Time + // New Zealand + NZST = GMT12, // Standard Time + NZDT = GMT13, // Daylight Saving Time + // Universal Coordinated Time = the new and politically correct name // for GMT UTC = GMT0 @@ -460,6 +464,10 @@ public: // resets time to 00:00:00, doesn't change the date wxDateTime& ResetTime(); + // get the date part of this object only, i.e. the object which has the + // same date as this one but time of 00:00:00 + wxDateTime GetDateOnly() const; + // the following functions don't change the values of the other // fields, i.e. SetMinute() won't change either hour or seconds value @@ -502,10 +510,6 @@ public: int n = 1, Month month = Inv_Month, int year = Inv_Year); -// wxDateTime GetWeekDay(WeekDay weekday, -// int n = 1, -// Month month = Inv_Month, -// int year = Inv_Year); // sets to the last weekday in the given month, year bool SetToLastWeekDay(WeekDay weekday, @@ -515,17 +519,6 @@ public: Month month = Inv_Month, int year = Inv_Year); - // sets the date to the given day of the given week in the year, - // returns True on success and False if given date doesn't exist (e.g. - // numWeek is > 53) - bool SetToTheWeek(wxDateTime_t numWeek, WeekDay weekday = Mon, WeekFlags flags = Monday_First); - wxDateTime GetWeek(wxDateTime_t numWeek, WeekDay weekday = Mon, WeekFlags flags = Monday_First); - - %pythoncode { - SetToTheWeek = wx._deprecated(SetToTheWeek, "SetToTheWeek is deprecated, use (static) SetToWeekOfYear instead") - GetWeek = wx._deprecated(GetWeek, "GetWeek is deprecated, use GetWeekOfYear instead") - } - // returns the date corresponding to the given week day of the given // week (in ISO notation) of the specified year static wxDateTime SetToWeekOfYear(int year, @@ -617,8 +610,10 @@ public: // is the date valid (True even for non initialized objects)? inline bool IsValid() const; - %pythoncode { Ok = IsValid } - %pythoncode { def __nonzero__(self): return self.Ok() }; + %pythoncode { IsOk = IsValid } + %pythoncode { Ok = IsOk } + + %pythoncode { def __nonzero__(self): return self.IsOk() }; // get the number of seconds since the Unix epoch - returns (time_t)-1 @@ -901,7 +896,6 @@ public: %property(RataDie, GetRataDie, doc="See `GetRataDie`"); %property(Second, GetSecond, SetSecond, doc="See `GetSecond` and `SetSecond`"); %property(Ticks, GetTicks, doc="See `GetTicks`"); - %property(Week, GetWeek, doc="See `GetWeek`"); %property(WeekDay, GetWeekDay, doc="See `GetWeekDay`"); %property(WeekDayInSameWeek, GetWeekDayInSameWeek, doc="See `GetWeekDayInSameWeek`"); %property(WeekOfMonth, GetWeekOfMonth, doc="See `GetWeekOfMonth`");