- static void GetAmPmStrings(wxString* am, wxString* pm);
-
- /**
- Returns the date and time in
- DOS
- format.
- */
- long unsigned int GetAsDOS() const;
-
- /**
- Get the beginning of DST for the given country in the given year (current one
- by default). This function suffers from limitations described in
- @ref overview_tdatedst "DST overview".
-
- @see GetEndDST()
- */
- static wxDateTime GetBeginDST(int year = Inv_Year,
- Country country = Country_Default);
-
- /**
- Returns the century of this date.
- */
- int GetCentury(const TimeZone& tz = Local) const;
-
- /**
- Returns the current default country. The default country is used for DST
- calculations, for example.
-
- @see SetCountry()
- */
- static Country GetCountry();
-
- /**
- Get the current month in given calendar (only Gregorian is currently supported).
- */
- static Month GetCurrentMonth(Calendar cal = Gregorian);
-
- /**
- Get the current year in given calendar (only Gregorian is currently supported).
- */
- static int GetCurrentYear(Calendar cal = Gregorian);
-
- /**
- Returns the object having the same date component as this one but time of
- 00:00:00.
-
- @wxsince{2.8.2}
-
- @see ResetTime()
- */
- wxDateTime GetDateOnly() const;
-
- /**
- Returns the day in the given timezone (local one by default).
- */
- short unsigned int 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;
-
- /**
- Returns the end of DST for the given country in the given year (current one by
- default).
-
- @see GetBeginDST()
- */
- static wxDateTime GetEndDST(int year = Inv_Year,
- Country country = Country_Default);
-
- /**
- Returns the hour in the given timezone (local one by default).
- */
- short unsigned int GetHour(const TimeZone& tz = Local) const;
-
- /**
- Synonym for GetJulianDayNumber().
- */
- double GetJDN() const;
-
- /**
- Returns the @ref setjdn() JDN corresponding to this date. Beware
- of rounding errors!
-
- @see GetModifiedJulianDayNumber()
- */
- double GetJulianDayNumber() const;
-
- /**
- Returns the copy of this object to which
- SetToLastMonthDay() was applied.
- */
- wxDateTime GetLastMonthDay(Month month = Inv_Month,
- int year = Inv_Year) const;
-
- /**
- Returns the copy of this object to which
- SetToLastWeekDay() was applied.
- */
- wxDateTime GetLastWeekDay(WeekDay weekday,
- Month month = Inv_Month,
- int year = Inv_Year);
-
- /**
- Synonym for GetModifiedJulianDayNumber().
- */
- double GetMJD() const;
-
- /**
- Returns the milliseconds in the given timezone (local one by default).
- */
- short unsigned int 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;
-
- /**
- Returns the @e Modified Julian Day Number (MJD) which is, by definition,
- 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 th
- noons like JDN. The MJD 0 is Nov 17, 1858.
- */
- double GetModifiedJulianDayNumber() const;
-
- /**
- Returns the month in the given timezone (local one by default).
- */
- Month GetMonth(const TimeZone& tz = Local) const;
-
- /**
- Gets the full (default) or abbreviated (specify @c Name_Abbr name of the
- given month.
-
- @see GetWeekDayName()
- */
- static wxString GetMonthName(Month month,
- NameFlags flags = Name_Full);
-
- /**
- Returns the copy of this object to which
- SetToNextWeekDay() was applied.
- */
- wxDateTime GetNextWeekDay(WeekDay weekday) const;
-
- //@{
- /**
- Returns the number of days in the given year or in the given month of the
- year.
- The only supported value for @a cal parameter is currently @c Gregorian.
- */
- static wxDateTime_t GetNumberOfDays(int year,
- Calendar cal = Gregorian);
- static wxDateTime_t GetNumberOfDays(Month month,
- int year = Inv_Year,
- Calendar cal = Gregorian);
- //@}
-
- /**
- Returns the copy of this object to which
- SetToPrevWeekDay() was applied.
- */
- wxDateTime GetPrevWeekDay(WeekDay weekday) const;
-
- /**
- Return the @e Rata Die number of this date.
- By definition, the Rata Die number is a date specified as the number of days
- relative to a base date of December 31 of the year 0. Thus January 1 of the
- year 1 is Rata Die day 1.
- */
- double GetRataDie() const;
-
- /**
- Returns the seconds in the given timezone (local one by default).
- */
- short unsigned int GetSecond(const TimeZone& tz = Local) const;
-
- /**
- Returns the number of seconds since Jan 1, 1970. An assert failure will occur
- if the date is not in the range covered by @c time_t type.
- */
- time_t GetTicks() const;
-
- /**
- Returns the current time.
- */
- static time_t GetTimeNow();
-
- /**
- Returns broken down representation of the date and time.
- */
- Tm GetTm(const TimeZone& tz = Local) const;
-
- /**
- Returns the current time broken down. Note that this function returns a
- pointer to a static buffer that's reused by calls to this function and
- certain C library functions (e.g. localtime). If there is any chance your
- code might be used in a multi-threaded application, you really should use
- the flavour of function GetTmNow()
- taking a parameter.
- */
- static struct tm* GetTmNow();
-
- /**
- Returns the copy of this object to which
- SetToWeekDay() was applied.
- */
- wxDateTime GetWeekDay(WeekDay weekday, int n = 1,
- Month month = Inv_Month,
- int year = Inv_Year) const;
-
- /**
- Returns the copy of this object to which
- SetToWeekDayInSameWeek() was
- applied.
- */
- wxDateTime GetWeekDayInSameWeek(WeekDay weekday,
- WeekFlags flags = Monday_First) const;
-
- /**
- Gets the full (default) or abbreviated (specify @c Name_Abbr name of the
- given week day.
-
- @see GetMonthName()
- */
- static wxString GetWeekDayName(WeekDay weekday,
- NameFlags flags = Name_Full);
-
- /**
- Returns the ordinal number of the week in the month (in 1...5 range).
- As GetWeekOfYear(), this function supports
- both conventions for the week start. See the description of these
- @ref overview_wxdatetime "week start" conventions.
- */
- wxDateTime_t GetWeekOfMonth(WeekFlags flags = Monday_First,
- const TimeZone& tz = Local) const;
-
- /**
- Returns the number of the week of the year this date is in. The first week of
- the year is, according to international standards, the one containing Jan 4 or,
- equivalently, the first week which has Thursday in this year. Both of these
- definitions are the same as saying that the first week of the year must contain
- more than half of its days in this year. Accordingly, the week number will
- always be in 1...53 range (52 for non-leap years).
- The function depends on the @ref overview_wxdatetime "week start" convention
- specified by the @a flags argument but its results for
- @c Sunday_First are not well-defined as the ISO definition quoted above
- applies to the weeks starting on Monday only.
- */
- wxDateTime_t GetWeekOfYear(WeekFlags flags = Monday_First,
- const TimeZone& tz = Local) const;
-
- /**
- Returns the year in the given timezone (local one by default).
- */
- int GetYear(const TimeZone& tz = Local) const;
-
- /**
- Returns the copy of this object to which
- SetToYearDay() was applied.
- */
- wxDateTime GetYearDay(short unsigned int) const;
-
- /**
- Returns @true if IsStrictlyBetween()
- is @true or if the date is equal to one of the limit values.
-
- @see IsStrictlyBetween()
- */
- bool IsBetween(const wxDateTime& t1, const wxDateTime& t2) const;
-
- /**
- Returns @true if the DST is applied for this date in the given country.
- */
- int IsDST(Country country = Country_Default) const;
-
- /**
- Returns @true if DST was used n the given year (the current one by
- default) in the given country.
- */
- static bool IsDSTApplicable(int year = Inv_Year,
- Country country = Country_Default);
-
- /**
- Returns @true if this date precedes the given one.
- */
- bool IsEarlierThan(const wxDateTime& datetime) const;
-
- /**
- Returns @true if the two dates are strictly identical.
- */
- bool IsEqualTo(const wxDateTime& datetime) const;
-
- /**
- Returns @true if the date is equal to another one up to the given time
- interval, i.e. if the absolute difference between the two dates is less than
- this interval.
- */
- bool IsEqualUpTo(const wxDateTime& dt, const wxTimeSpan& ts) const;
-
- /**
- Returns @true if the given date is later than the date of adoption of the
- Gregorian calendar in the given country (and hence the Gregorian calendar
- calculations make sense for it).
- */
- bool IsGregorianDate(GregorianAdoption country = Gr_Standard) const;
-
- /**
- Returns @true if this date is later than the given one.
- */
- bool IsLaterThan(const wxDateTime& datetime) const;
-
- /**
- Returns @true if the @a year is a leap one in the specified calendar.
- This functions supports Gregorian and Julian calendars.
- */
- static bool IsLeapYear(int year = Inv_Year,
- Calendar cal = Gregorian);
-
- /**
- Returns @true if the date is the same without comparing the time parts.
- */
- bool IsSameDate(const wxDateTime& dt) const;
-
- /**
- Returns @true if the time is the same (although dates may differ).
- */
- bool IsSameTime(const wxDateTime& dt) const;
-
- /**
- Returns @true if this date lies strictly between the two others,
-
- @see IsBetween()
- */
- bool IsStrictlyBetween(const wxDateTime& t1,
- const wxDateTime& t2) const;
-
- /**
- Returns @true if the object represents a valid time moment.
- */
- bool IsValid() const;
-
- /**
- This function returns @true if the specified (or default) country is one
- of Western European ones. It is used internally by wxDateTime to determine the
- DST convention and date and time formatting rules.
- */
- static bool IsWestEuropeanCountry(Country country = Country_Default);
-
- /**
- Returns @true is this day is not a holiday in the given country.
- */
- bool IsWorkDay(Country country = Country_Default) const;
-
- /**
- Same as FromTimezone() but modifies the object
- in place.
- */
- 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);
-
- /**
- This is the same as calling MakeTimezone() with
- the argument @c GMT0.
- */
- wxDateTime& MakeUTC(bool noDST = false);
-