1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxDateTime
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
12 wxDateTime class represents an absolute moment in the time.
14 The type @c wxDateTime_t is typedefed as <tt>unsigned short</tt> and is
15 used to contain the number of years, hours, minutes, seconds and
18 Global constant ::wxDefaultDateTime and synonym for it ::wxInvalidDateTime are
19 defined. This constant will be different from any valid wxDateTime object.
22 @section datetime_static Static Functions
24 All static functions either set or return the static variables of
25 wxDateSpan (the country), return the current moment, year, month or number
26 of days in it, or do some general calendar-related actions.
28 Please note that although several function accept an extra Calendar
29 parameter, it is currently ignored as only the Gregorian calendar is
30 supported. Future versions will support other calendars.
33 These methods are standalone functions named
34 "wxDateTime_<StaticMethodName>" in wxPython.
38 @section datetime_formatting Date Formatting and Parsing
40 The date formatting and parsing functions convert wxDateTime objects to and
41 from text. The conversions to text are mostly trivial: you can either do it
42 using the default date and time representations for the current locale
43 (FormatDate() and FormatTime()), using the international standard
44 representation defined by ISO 8601 (FormatISODate(), FormatISOTime() and
45 FormatISOCombined()) or by specifying any format at all and using Format()
48 The conversions from text are more interesting, as there are much more
49 possibilities to care about. The simplest cases can be taken care of with
50 ParseFormat() which can parse any date in the given (rigid) format.
51 ParseRfc822Date() is another function for parsing dates in predefined
52 format -- the one of RFC 822 which (still...) defines the format of email
53 messages on the Internet. This format can not be described with
54 @c strptime(3)-like format strings used by Format(), hence the need for a
57 But the most interesting functions are ParseTime(), ParseDate() and
58 ParseDateTime(). They try to parse the date and time (or only one of them)
59 in 'free' format, i.e. allow them to be specified in any of possible ways.
60 These functions will usually be used to parse the (interactive) user input
61 which is not bound to be in any predefined format. As an example,
62 ParseDateTime() can parse the strings such as "tomorrow", "March first" and
65 Finally notice that each of the parsing functions is available in several
66 overloads: if the input string is a narrow (@c char *) string, then a
67 narrow pointer is returned. If the input string is a wide string, a wide
68 char pointer is returned. Finally, if the input parameter is a wxString, a
69 narrow char pointer is also returned for backwards compatibility but there
70 is also an additional argument of wxString::const_iterator type in which,
71 if it is not @NULL, an iterator pointing to the end of the scanned string
81 @see @ref overview_datetime, wxTimeSpan, wxDateSpan, wxCalendarCtrl
87 A small unsigned integer type for storing things like minutes,
88 seconds &c. It should be at least short (i.e. not char) to contain
89 the number of milliseconds - it may also be 'int' because there is
90 no size penalty associated with it in our code, we don't store any
93 typedef unsigned short wxDateTime_t
;
97 Time zone symbolic names.
101 /// the time in the current time zone
105 /// zones from GMT (= Greenwhich Mean Time): they're guaranteed to be
106 /// consequent numbers, so writing something like `GMT0 + offset' is
107 /// safe if abs(offset) <= 12
109 // underscore stands for minus
110 GMT_12
, GMT_11
, GMT_10
, GMT_9
, GMT_8
, GMT_7
,
111 GMT_6
, GMT_5
, GMT_4
, GMT_3
, GMT_2
, GMT_1
,
113 GMT1
, GMT2
, GMT3
, GMT4
, GMT5
, GMT6
,
114 GMT7
, GMT8
, GMT9
, GMT10
, GMT11
, GMT12
, GMT13
,
115 // Note that GMT12 and GMT_12 are not the same: there is a difference
116 // of exactly one day between them
119 // some symbolic names for TZ
122 WET
= GMT0
, //!< Western Europe Time
123 WEST
= GMT1
, //!< Western Europe Summer Time
124 CET
= GMT1
, //!< Central Europe Time
125 CEST
= GMT2
, //!< Central Europe Summer Time
126 EET
= GMT2
, //!< Eastern Europe Time
127 EEST
= GMT3
, //!< Eastern Europe Summer Time
128 MSK
= GMT3
, //!< Moscow Time
129 MSD
= GMT4
, //!< Moscow Summer Time
132 AST
= GMT_4
, //!< Atlantic Standard Time
133 ADT
= GMT_3
, //!< Atlantic Daylight Time
134 EST
= GMT_5
, //!< Eastern Standard Time
135 EDT
= GMT_4
, //!< Eastern Daylight Saving Time
136 CST
= GMT_6
, //!< Central Standard Time
137 CDT
= GMT_5
, //!< Central Daylight Saving Time
138 MST
= GMT_7
, //!< Mountain Standard Time
139 MDT
= GMT_6
, //!< Mountain Daylight Saving Time
140 PST
= GMT_8
, //!< Pacific Standard Time
141 PDT
= GMT_7
, //!< Pacific Daylight Saving Time
142 HST
= GMT_10
, //!< Hawaiian Standard Time
143 AKST
= GMT_9
, //!< Alaska Standard Time
144 AKDT
= GMT_8
, //!< Alaska Daylight Saving Time
148 A_WST
= GMT8
, //!< Western Standard Time
149 A_CST
= GMT13
+ 1, //!< Central Standard Time (+9.5)
150 A_EST
= GMT10
, //!< Eastern Standard Time
151 A_ESST
= GMT11
, //!< Eastern Summer Time
154 NZST
= GMT12
, //!< Standard Time
155 NZDT
= GMT13
, //!< Daylight Saving Time
157 /// Universal Coordinated Time = the new and politically correct name
163 Several functions accept an extra parameter specifying the calendar to use
164 (although most of them only support now the Gregorian calendar). This
165 parameters is one of the following values.
169 Gregorian
, ///< calendar currently in use in Western countries
170 Julian
///< calendar in use since -45 until the 1582 (or later)
174 Date calculations often depend on the country and wxDateTime allows to set
175 the country whose conventions should be used using SetCountry(). It takes
176 one of the following values as parameter.
180 Country_Unknown
, ///< no special information for this country
181 Country_Default
, ///< set the default country with SetCountry() method
182 ///< or use the default country with any other
184 Country_WesternEurope_Start
,
185 Country_EEC
= Country_WesternEurope_Start
,
189 Country_WesternEurope_End
= UK
,
196 /// symbolic names for the months
199 Jan
, Feb
, Mar
, Apr
, May
, Jun
, Jul
, Aug
, Sep
, Oct
, Nov
, Dec
,
201 /// Invalid month value.
205 /// symbolic names for the weekdays
208 Sun
, Mon
, Tue
, Wed
, Thu
, Fri
, Sat
,
210 /// Invalid week day value.
214 /// invalid value for the year
217 Inv_Year
= SHRT_MIN
// should hold in wxDateTime_t
221 Flags to be used with GetMonthName() and GetWeekDayName() functions.
225 Name_Full
= 0x01, ///< return full name
226 Name_Abbr
= 0x02 ///< return abbreviated name
230 Different parts of the world use different conventions for the week start.
231 In some countries, the week starts on Sunday, while in others -- on Monday.
232 The ISO standard doesn't address this issue, so we support both conventions
233 in the functions whose result depends on it (GetWeekOfYear() and
236 The desired behvaiour may be specified by giving one of the following
237 constants as argument to these functions.
241 Default_First
, ///< Sunday_First for US, Monday_First for the rest
242 Monday_First
, ///< week starts with a Monday
243 Sunday_First
///< week starts with a Sunday
248 @name Constructors, Assignment Operators and Setters
250 Constructors and various Set() methods are collected here. If you
251 construct a date object from separate values for day, month and year,
252 you should use IsValid() method to check that the values were correct
253 as constructors can not return an error code.
258 Default constructor. Use one of the Set() functions to initialize the
266 This constructor is named "wxDateTimeFromTimeT" in wxPython.
269 wxDateTime(time_t timet
);
273 @beginWxPythonOnly Unsupported. @endWxPythonOnly
275 wxDateTime(const struct tm
& tm
);
280 This constructor is named "wxDateTimeFromJDN" in wxPython.
283 wxDateTime(double jdn
);
288 This constructor is named "wxDateTimeFromHMS" in wxPython.
291 wxDateTime(wxDateTime_t hour
, wxDateTime_t minute
= 0,
292 wxDateTime_t second
= 0, wxDateTime_t millisec
= 0);
297 This constructor is named "wxDateTimeFromDMY" in wxPython.
300 wxDateTime(wxDateTime_t day
, Month month
= Inv_Month
,
301 int year
= Inv_Year
, wxDateTime_t hour
= 0,
302 wxDateTime_t minute
= 0, wxDateTime_t second
= 0,
303 wxDateTime_t millisec
= 0);
306 Same as SetFromMSWSysTime.
309 Input, Windows SYSTEMTIME reference
313 wxDateTime(const struct _SYSTEMTIME
& st
);
317 Reset time to midnight (00:00:00) without changing the date.
319 wxDateTime
& ResetTime();
322 Constructs the object from @a timet value holding the number of seconds
326 This method is named "SetTimeT" in wxPython.
329 wxDateTime
& Set(time_t timet
);
331 Sets the date and time from the broken down representation in the
332 standard @a tm structure.
334 @beginWxPythonOnly Unsupported. @endWxPythonOnly
336 wxDateTime
& Set(const struct tm
& tm
);
338 Sets the date from the so-called Julian Day Number.
340 By definition, the Julian Day Number, usually abbreviated as JDN, of a
341 particular instant is the fractional number of days since 12 hours
342 Universal Coordinated Time (Greenwich mean noon) on January 1 of the
343 year -4712 in the Julian proleptic calendar.
346 This method is named "SetJDN" in wxPython.
349 wxDateTime
& Set(double jdn
);
351 Sets the date to be equal to Today() and the time from supplied
355 This method is named "SetHMS" in wxPython.
358 wxDateTime
& Set(wxDateTime_t hour
, wxDateTime_t minute
= 0,
359 wxDateTime_t second
= 0, wxDateTime_t millisec
= 0);
361 Sets the date and time from the parameters.
363 wxDateTime
& Set(wxDateTime_t day
, Month month
= Inv_Month
,
364 int year
= Inv_Year
, wxDateTime_t hour
= 0,
365 wxDateTime_t minute
= 0, wxDateTime_t second
= 0,
366 wxDateTime_t millisec
= 0);
369 Sets the day without changing other date components.
371 wxDateTime
& SetDay(unsigned short day
);
374 Sets the date from the date and time in DOS format.
376 wxDateTime
& SetFromDOS(unsigned long ddt
);
379 Sets the hour without changing other date components.
381 wxDateTime
& SetHour(unsigned short hour
);
384 Sets the millisecond without changing other date components.
386 wxDateTime
& SetMillisecond(unsigned short millisecond
);
389 Sets the minute without changing other date components.
391 wxDateTime
& SetMinute(unsigned short minute
);
394 Sets the month without changing other date components.
396 wxDateTime
& SetMonth(Month month
);
399 Sets the second without changing other date components.
401 wxDateTime
& SetSecond(unsigned short second
);
404 Sets the date and time of to the current values. Same as assigning the
405 result of Now() to this object.
407 wxDateTime
& SetToCurrent();
410 Sets the year without changing other date components.
412 wxDateTime
& SetYear(int year
);
417 wxDateTime
& operator=(time_t timet
);
421 wxDateTime
& operator=(const struct tm
& tm
);
430 Here are the trivial accessors. Other functions, which might have to
431 perform some more complicated calculations to find the answer are under
432 the "Date Arithmetics" section.
437 Returns the date and time in DOS format.
439 long unsigned int GetAsDOS() const;
442 Initialize using the Windows SYSTEMTIME structure.
444 Input, Windows SYSTEMTIME reference
448 wxDateTime
& SetFromMSWSysTime(const struct _SYSTEMTIME
& st
);
451 Returns the date and time in the Windows SYSTEMTIME format.
453 Output, pointer to Windows SYSTEMTIME
457 void GetAsMSWSysTime(struct _SYSTEMTIME
* st
) const;
460 Returns the century of this date.
462 int GetCentury(const TimeZone
& tz
= Local
) const;
465 Returns the object having the same date component as this one but time
472 wxDateTime
GetDateOnly() const;
475 Returns the day in the given timezone (local one by default).
477 short unsigned int GetDay(const TimeZone
& tz
= Local
) const;
480 Returns the day of the year (in 1-366 range) in the given timezone
481 (local one by default).
483 short unsigned int GetDayOfYear(const TimeZone
& tz
= Local
) const;
486 Returns the hour in the given timezone (local one by default).
488 short unsigned int GetHour(const TimeZone
& tz
= Local
) const;
491 Returns the milliseconds in the given timezone (local one by default).
493 short unsigned int GetMillisecond(const TimeZone
& tz
= Local
) const;
496 Returns the minute in the given timezone (local one by default).
498 short unsigned int GetMinute(const TimeZone
& tz
= Local
) const;
501 Returns the month in the given timezone (local one by default).
503 Month
GetMonth(const TimeZone
& tz
= Local
) const;
506 Returns the seconds in the given timezone (local one by default).
508 short unsigned int GetSecond(const TimeZone
& tz
= Local
) const;
511 Returns the number of seconds since Jan 1, 1970. An assert failure will
512 occur if the date is not in the range covered by @c time_t type.
514 time_t GetTicks() const;
517 Returns broken down representation of the date and time.
519 Tm
GetTm(const TimeZone
& tz
= Local
) const;
522 Returns the week day in the given timezone (local one by default).
524 WeekDay
GetWeekDay(const TimeZone
& tz
= Local
) const;
527 Returns the ordinal number of the week in the month (in 1-5 range).
529 As GetWeekOfYear(), this function supports both conventions for the
532 wxDateTime_t
GetWeekOfMonth(WeekFlags flags
= Monday_First
,
533 const TimeZone
& tz
= Local
) const;
536 Returns the number of the week of the year this date is in. The first
537 week of the year is, according to international standards, the one
538 containing Jan 4 or, equivalently, the first week which has Thursday in
539 this year. Both of these definitions are the same as saying that the
540 first week of the year must contain more than half of its days in this
541 year. Accordingly, the week number will always be in 1-53 range (52 for
544 The function depends on the week start convention specified by the @a flags
545 argument but its results for @c Sunday_First are not well-defined as the
546 ISO definition quoted above applies to the weeks starting on Monday only.
548 wxDateTime_t
GetWeekOfYear(WeekFlags flags
= Monday_First
,
549 const TimeZone
& tz
= Local
) const;
552 Returns the year in the given timezone (local one by default).
554 int GetYear(const TimeZone
& tz
= Local
) const;
557 Returns @true if the given date is later than the date of adoption of
558 the Gregorian calendar in the given country (and hence the Gregorian
559 calendar calculations make sense for it).
561 bool IsGregorianDate(GregorianAdoption country
= Gr_Standard
) const;
564 Returns @true if the object represents a valid time moment.
566 bool IsValid() const;
569 Returns @true is this day is not a holiday in the given country.
571 bool IsWorkDay(Country country
= Country_Default
) const;
578 @name Date Comparison
580 There are several functions to allow date comparison. To supplement
581 them, a few global operators, etc taking wxDateTime are defined.
586 Returns @true if this date precedes the given one.
588 bool IsEarlierThan(const wxDateTime
& datetime
) const;
591 Returns @true if the two dates are strictly identical.
593 bool IsEqualTo(const wxDateTime
& datetime
) const;
596 Returns @true if the date is equal to another one up to the given time
597 interval, i.e. if the absolute difference between the two dates is less
600 bool IsEqualUpTo(const wxDateTime
& dt
, const wxTimeSpan
& ts
) const;
603 Returns @true if this date is later than the given one.
605 bool IsLaterThan(const wxDateTime
& datetime
) const;
608 Returns @true if the date is the same without comparing the time parts.
610 bool IsSameDate(const wxDateTime
& dt
) const;
613 Returns @true if the time is the same (although dates may differ).
615 bool IsSameTime(const wxDateTime
& dt
) const;
618 Returns @true if this date lies strictly between the two given dates.
622 bool IsStrictlyBetween(const wxDateTime
& t1
,
623 const wxDateTime
& t2
) const;
626 Returns @true if IsStrictlyBetween() is @true or if the date is equal
627 to one of the limit values.
629 @see IsStrictlyBetween()
631 bool IsBetween(const wxDateTime
& t1
, const wxDateTime
& t2
) const;
638 @name Date Arithmetics
640 These functions carry out
641 @ref overview_datetime_arithmetics "arithmetics" on the wxDateTime
642 objects. As explained in the overview, either wxTimeSpan or wxDateSpan
643 may be added to wxDateTime, hence all functions are overloaded to
644 accept both arguments.
646 Also, both Add() and Subtract() have both const and non-const version.
647 The first one returns a new object which represents the sum/difference
648 of the original one with the argument while the second form modifies
649 the object to which it is applied. The operators "-=" and "+=" are
650 defined to be equivalent to the second forms of these functions.
655 Adds the given date span to this object.
658 This method is named "AddDS" in wxPython.
661 wxDateTime
Add(const wxDateSpan
& diff
) const;
663 Adds the given date span to this object.
666 This method is named "AddDS" in wxPython.
669 wxDateTime
Add(const wxDateSpan
& diff
);
671 Adds the given time span to this object.
674 This method is named "AddTS" in wxPython.
677 wxDateTime
Add(const wxTimeSpan
& diff
) const;
679 Adds the given time span to this object.
682 This method is named "AddTS" in wxPython.
685 wxDateTime
& Add(const wxTimeSpan
& diff
);
688 Subtracts the given time span from this object.
691 This method is named "SubtractTS" in wxPython.
694 wxDateTime
Subtract(const wxTimeSpan
& diff
) const;
696 Subtracts the given time span from this object.
699 This method is named "SubtractTS" in wxPython.
702 wxDateTime
& Subtract(const wxTimeSpan
& diff
);
704 Subtracts the given date span from this object.
707 This method is named "SubtractDS" in wxPython.
710 wxDateTime
Subtract(const wxDateSpan
& diff
) const;
712 Subtracts the given date span from this object.
715 This method is named "SubtractDS" in wxPython.
718 wxDateTime
& Subtract(const wxDateSpan
& diff
);
720 Subtracts another date from this one and returns the difference between
721 them as a wxTimeSpan.
723 wxTimeSpan
Subtract(const wxDateTime
& dt
) const;
726 Adds the given date span to this object.
728 wxDateTime
operator+=(const wxDateSpan
& diff
);
730 Subtracts the given date span from this object.
732 wxDateTime
& operator-=(const wxDateSpan
& diff
);
734 Adds the given time span to this object.
736 wxDateTime
& operator+=(const wxTimeSpan
& diff
);
738 Subtracts the given time span from this object.
740 wxDateTime
& operator-=(const wxTimeSpan
& diff
);
747 @name Date Formatting and Parsing
749 See @ref datetime_formatting
754 This function does the same as the standard ANSI C @c strftime(3)
755 function (http://www.cplusplus.com/reference/clibrary/ctime/strftime.html).
756 Please see its description for the meaning of @a format parameter.
758 It also accepts a few wxWidgets-specific extensions: you can optionally
759 specify the width of the field to follow using @c printf(3)-like syntax
760 and the format specification @c "%l" can be used to get the number of
765 wxString
Format(const wxString
& format
= wxDefaultDateTimeFormat
,
766 const TimeZone
& tz
= Local
) const;
769 Identical to calling Format() with @c "%x" argument (which means
770 "preferred date representation for the current locale").
772 wxString
FormatDate() const;
775 Returns the combined date-time representation in the ISO 8601 format
776 @c "YYYY-MM-DDTHH:MM:SS". The @a sep parameter default value produces
777 the result exactly corresponding to the ISO standard, but it can also
778 be useful to use a space as seprator if a more human-readable combined
779 date-time representation is needed.
781 @see FormatISODate(), FormatISOTime(), ParseISOCombined()
783 wxString
FormatISOCombined(char sep
= 'T') const;
786 This function returns the date representation in the ISO 8601 format
789 wxString
FormatISODate() const;
792 This function returns the time representation in the ISO 8601 format
795 wxString
FormatISOTime() const;
798 Identical to calling Format() with @c "%X" argument (which means
799 "preferred time representation for the current locale").
801 wxString
FormatTime() const;
804 This function is like ParseDateTime(), but it only allows the date to
805 be specified. It is thus less flexible then ParseDateTime(), but also
806 has less chances to misinterpret the user input.
808 @return @NULL if the conversion failed, otherwise return the pointer
809 to the character which stopped the scan.
813 const char* ParseDate(const wxString
& date
,
814 wxString::const_iterator
* end
= NULL
);
819 const char* ParseDate(const char* date
);
824 const wchar_t* ParseDate(const wchar_t* date
);
827 Parses the string @a datetime containing the date and time in free
828 format. This function tries as hard as it can to interpret the given
829 string as date and time. Unlike ParseRfc822Date(), it will accept
830 anything that may be accepted and will only reject strings which can
831 not be parsed in any way at all.
833 @return @NULL if the conversion failed, otherwise return the pointer
834 to the character which stopped the scan.
836 const char* ParseDateTime(const wxString
& datetime
,
837 wxString::const_iterator
* end
= NULL
);
842 const char* ParseDateTime(const char* datetime
);
847 const wchar_t* ParseDateTime(const wchar_t* datetime
);
850 This function parses the string @a date according to the given
851 @e format. The system @c strptime(3) function is used whenever
852 available, but even if it is not, this function is still implemented,
853 although support for locale-dependent format specifiers such as
854 @c "%c", @c "%x" or @c "%X" may not be perfect and GNU extensions such
855 as @c "%z" and @c "%Z" are not implemented. This function does handle
856 the month and weekday names in the current locale on all platforms,
859 Please see the description of the ANSI C function @c strftime(3) for
860 the syntax of the format string.
862 The @a dateDef parameter is used to fill in the fields which could not
863 be determined from the format string. For example, if the format is
864 @c "%d" (the day of the month), the month and the year are taken from
865 @a dateDef. If it is not specified, Today() is used as the default
868 @return @NULL if the conversion failed, otherwise return the pointer
869 to the character which stopped the scan.
873 const char* ParseFormat(const wxString
& date
,
874 const wxString
& format
= wxDefaultDateTimeFormat
,
875 const wxDateTime
& dateDef
= wxDefaultDateTime
,
876 wxString::const_iterator
* end
= NULL
);
881 const char* ParseFormat(const char* date
,
882 const wxString
& format
= wxDefaultDateTimeFormat
,
883 const wxDateTime
& dateDef
= wxDefaultDateTime
);
888 const wchar_t* ParseFormat(const wchar_t* date
,
889 const wxString
& format
= wxDefaultDateTimeFormat
,
890 const wxDateTime
& dateDef
= wxDefaultDateTime
);
893 This function parses the string containing the date and time in ISO
894 8601 combined format @c "YYYY-MM-DDTHH:MM:SS". The separator between
895 the date and time parts must be equal to @a sep for the function to
898 @return @true if the entire string was parsed successfully, @false
901 bool ParseISOCombined(const wxString
& date
, char sep
= 'T');
904 This function parses the date in ISO 8601 format @c "YYYY-MM-DD".
906 @return @true if the entire string was parsed successfully, @false
909 bool ParseISODate(const wxString
& date
);
912 This function parses the time in ISO 8601 format @c "HH:MM:SS".
914 @return @true if the entire string was parsed successfully, @false
917 bool ParseISOTime(const wxString
& date
);
920 Parses the string @a date looking for a date formatted according to the
921 RFC 822 in it. The exact description of this format may, of course, be
922 found in the RFC (section 5), but, briefly, this is the format used in
923 the headers of Internet email messages and one of the most common
924 strings expressing date in this format may be something like
925 @c "Sat, 18 Dec 1999 00:48:30 +0100".
927 Returns @NULL if the conversion failed, otherwise return the pointer to
928 the character immediately following the part of the string which could
929 be parsed. If the entire string contains only the date in RFC 822
930 format, the returned pointer will be pointing to a @c NUL character.
932 This function is intentionally strict, it will return an error for any
933 string which is not RFC 822 compliant. If you need to parse date
934 formatted in more free ways, you should use ParseDateTime() or
937 const char* ParseRfc822Date(const wxString
& date
,
938 wxString::const_iterator
* end
= NULL
);
943 const char* ParseRfc822Date(const char* date
);
948 const wchar_t* ParseRfc822Date(const wchar_t* date
);
951 This functions is like ParseDateTime(), but only allows the time to be
952 specified in the input string.
954 @return @NULL if the conversion failed, otherwise return the pointer
955 to the character which stopped the scan.
957 const char* ParseTime(const wxString
& time
,
958 wxString::const_iterator
* end
= NULL
);
963 const char* ParseTime(const char* time
);
968 const wchar_t* ParseTime(const wchar_t* time
);
975 @name Calendar Calculations
977 The functions in this section perform the basic calendar calculations,
978 mostly related to the week days. They allow to find the given week day
979 in the week with given number (either in the month or in the year) and
982 None of the functions in this section modify the time part of the
983 wxDateTime, they only work with the date part of it.
988 Returns the copy of this object to which SetToLastMonthDay() was
991 wxDateTime
GetLastMonthDay(Month month
= Inv_Month
,
992 int year
= Inv_Year
) const;
995 Returns the copy of this object to which SetToLastWeekDay() was
998 wxDateTime
GetLastWeekDay(WeekDay weekday
, Month month
= Inv_Month
,
999 int year
= Inv_Year
);
1002 Returns the copy of this object to which SetToNextWeekDay() was
1005 wxDateTime
GetNextWeekDay(WeekDay weekday
) const;
1008 Returns the copy of this object to which SetToPrevWeekDay() was
1011 wxDateTime
GetPrevWeekDay(WeekDay weekday
) const;
1014 Returns the copy of this object to which SetToWeekDay() was applied.
1016 wxDateTime
GetWeekDay(WeekDay weekday
, int n
= 1, Month month
= Inv_Month
,
1017 int year
= Inv_Year
) const;
1020 Returns the copy of this object to which SetToWeekDayInSameWeek() was
1023 wxDateTime
GetWeekDayInSameWeek(WeekDay weekday
,
1024 WeekFlags flags
= Monday_First
) const;
1027 Returns the copy of this object to which SetToYearDay() was applied.
1029 wxDateTime
GetYearDay(wxDateTime_t yday
) const;
1032 Sets the date to the last day in the specified month (the current one
1035 @return The reference to the modified object itself.
1037 wxDateTime
& SetToLastMonthDay(Month month
= Inv_Month
, int year
= Inv_Year
);
1040 The effect of calling this function is the same as of calling
1041 @c SetToWeekDay(-1, weekday, month, year). The date will be set to the
1042 last @a weekday in the given month and year (the current ones by
1043 default). Always returns @true.
1045 bool SetToLastWeekDay(WeekDay weekday
, Month month
= Inv_Month
,
1046 int year
= Inv_Year
);
1049 Sets the date so that it will be the first @a weekday following the
1052 @return The reference to the modified object itself.
1054 wxDateTime
& SetToNextWeekDay(WeekDay weekday
);
1057 Sets the date so that it will be the last @a weekday before the current
1060 @return The reference to the modified object itself.
1062 wxDateTime
& SetToPrevWeekDay(WeekDay weekday
);
1065 Sets the date to the @e n-th @a weekday in the given month of the given
1066 year (the current month and year are used by default). The parameter
1067 @a n may be either positive (counting from the beginning of the month)
1068 or negative (counting from the end of it).
1070 For example, SetToWeekDay(2, wxDateTime::Wed) will set the date to the
1071 second Wednesday in the current month and
1072 SetToWeekDay(-1, wxDateTime::Sun) will set the date to the last Sunday
1073 in the current month.
1075 @return @true if the date was modified successfully, @false otherwise
1076 meaning that the specified date doesn't exist.
1078 bool SetToWeekDay(WeekDay weekday
, int n
= 1,
1079 Month month
= Inv_Month
, int year
= Inv_Year
);
1082 Adjusts the date so that it will still lie in the same week as before,
1083 but its week day will be the given one.
1085 @return The reference to the modified object itself.
1087 wxDateTime
& SetToWeekDayInSameWeek(WeekDay weekday
,
1088 WeekFlags flags
= Monday_First
);
1091 Sets the date to the day number @a yday in the same year (i.e., unlike
1092 the other functions, this one does not use the current year). The day
1093 number should be in the range 1-366 for the leap years and 1-365 for
1096 @return The reference to the modified object itself.
1098 wxDateTime
& SetToYearDay(wxDateTime_t yday
);
1105 @name Astronomical/Historical Functions
1107 Some degree of support for the date units used in astronomy and/or
1108 history is provided. You can construct a wxDateTime object from a
1109 JDN and you may also get its JDN, MJD or Rata Die number from it.
1111 Related functions in other groups: wxDateTime(double), Set(double)
1116 Synonym for GetJulianDayNumber().
1118 double GetJDN() const;
1121 Returns the JDN corresponding to this date. Beware of rounding errors!
1123 @see GetModifiedJulianDayNumber()
1125 double GetJulianDayNumber() const;
1128 Synonym for GetModifiedJulianDayNumber().
1130 double GetMJD() const;
1133 Returns the @e "Modified Julian Day Number" (MJD) which is, by
1134 definition, is equal to JDN - 2400000.5.
1135 The MJDs are simpler to work with as the integral MJDs correspond to
1136 midnights of the dates in the Gregorian calendar and not the noons like
1137 JDN. The MJD 0 represents Nov 17, 1858.
1139 double GetModifiedJulianDayNumber() const;
1142 Return the @e Rata Die number of this date.
1144 By definition, the Rata Die number is a date specified as the number of
1145 days relative to a base date of December 31 of the year 0. Thus January
1146 1 of the year 1 is Rata Die day 1.
1148 double GetRataDie() const;
1155 @name Time Zone and DST Support
1157 Please see the @ref overview_datetime_timezones "time zone overview"
1158 for more information about time zones. Normally, these functions should
1161 Related functions in other groups: GetBeginDST(), GetEndDST()
1166 Transform the date from the given time zone to the local one. If
1167 @a noDST is @true, no DST adjustments will be made.
1169 @return The date in the local time zone.
1171 wxDateTime
FromTimezone(const TimeZone
& tz
, bool noDST
= false) const;
1174 Returns @true if the DST is applied for this date in the given country.
1176 @see GetBeginDST(), GetEndDST()
1178 int IsDST(Country country
= Country_Default
) const;
1181 Same as FromTimezone() but modifies the object in place.
1183 wxDateTime
& MakeFromTimezone(const TimeZone
& tz
, bool noDST
= false);
1186 Modifies the object in place to represent the date in another time
1187 zone. If @a noDST is @true, no DST adjustments will be made.
1189 wxDateTime
& MakeTimezone(const TimeZone
& tz
, bool noDST
= false);
1192 This is the same as calling MakeTimezone() with the argument @c GMT0.
1194 wxDateTime
& MakeUTC(bool noDST
= false);
1197 Transform the date to the given time zone. If @a noDST is @true, no DST
1198 adjustments will be made.
1200 @return The date in the new time zone.
1202 wxDateTime
ToTimezone(const TimeZone
& tz
, bool noDST
= false) const;
1205 This is the same as calling ToTimezone() with the argument @c GMT0.
1207 wxDateTime
ToUTC(bool noDST
= false) const;
1216 Converts the year in absolute notation (i.e. a number which can be
1217 negative, positive or zero) to the year in BC/AD notation. For the
1218 positive years, nothing is done, but the year 0 is year 1 BC and so for
1219 other years there is a difference of 1.
1221 This function should be used like this:
1225 int y = dt.GetYear();
1226 printf("The year is %d%s", wxDateTime::ConvertYearToBC(y), y > 0 ? "AD" : "BC");
1229 static int ConvertYearToBC(int year
);
1232 Returns the translations of the strings @c AM and @c PM used for time
1233 formatting for the current locale. Either of the pointers may be @NULL
1234 if the corresponding value is not needed.
1236 static void GetAmPmStrings(wxString
* am
, wxString
* pm
);
1239 Get the beginning of DST for the given country in the given year
1240 (current one by default). This function suffers from limitations
1241 described in the @ref overview_datetime_dst "DST overview".
1245 static wxDateTime
GetBeginDST(int year
= Inv_Year
,
1246 Country country
= Country_Default
);
1249 Returns the end of DST for the given country in the given year (current
1254 static wxDateTime
GetEndDST(int year
= Inv_Year
,
1255 Country country
= Country_Default
);
1258 Get the current century, i.e. first two digits of the year, in given
1259 calendar (only Gregorian is currently supported).
1261 static int GetCentury(int year
);
1264 Returns the current default country. The default country is used for
1265 DST calculations, for example.
1269 static Country
GetCountry();
1272 Get the current month in given calendar (only Gregorian is currently
1275 static Month
GetCurrentMonth(Calendar cal
= Gregorian
);
1278 Get the current year in given calendar (only Gregorian is currently
1281 static int GetCurrentYear(Calendar cal
= Gregorian
);
1284 Return the standard English name of the given month.
1286 This function always returns "January" or "Jan" for January, use
1287 GetMonthName() to retrieve the name of the month in the users current
1291 One of wxDateTime::Jan, ..., wxDateTime::Dec values.
1293 Either Name_Full (default) or Name_Abbr.
1295 @see GetEnglishWeekDayName()
1299 static wxString
GetEnglishMonthName(Month month
,
1300 NameFlags flags
= Name_Full
);
1303 Return the standard English name of the given week day.
1305 This function always returns "Monday" or "Mon" for Monday, use
1306 GetWeekDayName() to retrieve the name of the month in the users current
1310 One of wxDateTime::Sun, ..., wxDateTime::Sat values.
1312 Either Name_Full (default) or Name_Abbr.
1314 @see GetEnglishMonthName()
1318 static wxString
GetEnglishWeekDayName(WeekDay weekday
,
1319 NameFlags flags
= Name_Full
);
1322 Gets the full (default) or abbreviated name of the given month.
1324 This function returns the name in the current locale, use
1325 GetEnglishMonthName() to get the untranslated name if necessary.
1328 One of wxDateTime::Jan, ..., wxDateTime::Dec values.
1330 Either Name_Full (default) or Name_Abbr.
1332 @see GetWeekDayName()
1334 static wxString
GetMonthName(Month month
, NameFlags flags
= Name_Full
);
1337 Returns the number of days in the given year. The only supported value
1338 for @a cal currently is @c Gregorian.
1341 This method is named "GetNumberOfDaysInYear" in wxPython.
1344 static wxDateTime_t
GetNumberOfDays(int year
, Calendar cal
= Gregorian
);
1347 Returns the number of days in the given month of the given year. The
1348 only supported value for @a cal currently is @c Gregorian.
1351 This method is named "GetNumberOfDaysInMonth" in wxPython.
1354 static wxDateTime_t
GetNumberOfDays(Month month
, int year
= Inv_Year
,
1355 Calendar cal
= Gregorian
);
1358 Returns the current time.
1360 static time_t GetTimeNow();
1363 Returns the current time broken down using the buffer whose adress is
1364 passed to the function with @a tm to store the result.
1366 static tm
* GetTmNow(struct tm
*tm
);
1369 Returns the current time broken down. Note that this function returns a
1370 pointer to a static buffer that's reused by calls to this function and
1371 certain C library functions (e.g. localtime). If there is any chance
1372 your code might be used in a multi-threaded application, you really
1373 should use GetTmNow(struct tm *) instead.
1375 static tm
* GetTmNow();
1378 Gets the full (default) or abbreviated name of the given week day.
1380 This function returns the name in the current locale, use
1381 GetEnglishWeekDayName() to get the untranslated name if necessary.
1384 One of wxDateTime::Sun, ..., wxDateTime::Sat values.
1386 Either Name_Full (default) or Name_Abbr.
1390 static wxString
GetWeekDayName(WeekDay weekday
,
1391 NameFlags flags
= Name_Full
);
1394 Returns @true if DST was used in the given year (the current one by
1395 default) in the given country.
1397 static bool IsDSTApplicable(int year
= Inv_Year
,
1398 Country country
= Country_Default
);
1401 Returns @true if the @a year is a leap one in the specified calendar.
1402 This functions supports Gregorian and Julian calendars.
1404 static bool IsLeapYear(int year
= Inv_Year
, Calendar cal
= Gregorian
);
1407 This function returns @true if the specified (or default) country is
1408 one of Western European ones. It is used internally by wxDateTime to
1409 determine the DST convention and date and time formatting rules.
1411 static bool IsWestEuropeanCountry(Country country
= Country_Default
);
1414 Returns the object corresponding to the current time.
1419 wxDateTime now = wxDateTime::Now();
1420 printf("Current time in Paris:\t%s\n", now.Format("%c", wxDateTime::CET).c_str());
1423 @note This function is accurate up to seconds. UNow() should be used
1424 for better precision, but it is less efficient and might not be
1425 available on all platforms.
1429 static wxDateTime
Now();
1432 Sets the country to use by default. This setting influences the DST
1433 calculations, date formatting and other things.
1437 static void SetCountry(Country country
);
1440 Set the date to the given @a weekday in the week number @a numWeek of
1441 the given @a year . The number should be in range 1-53.
1443 Note that the returned date may be in a different year than the one
1444 passed to this function because both the week 1 and week 52 or 53 (for
1445 leap years) contain days from different years. See GetWeekOfYear() for
1446 the explanation of how the year weeks are counted.
1448 static wxDateTime
SetToWeekOfYear(int year
, wxDateTime_t numWeek
,
1449 WeekDay weekday
= Mon
);
1452 Returns the object corresponding to the midnight of the current day
1453 (i.e. the same as Now(), but the time part is set to 0).
1457 static wxDateTime
Today();
1460 Returns the object corresponding to the current time including the
1461 milliseconds if a function to get time with such precision is available
1462 on the current platform (supported under most Unices and Win32).
1466 static wxDateTime
UNow();
1470 Global instance of an empty wxDateTime object.
1472 @todo Would it be better to rename this wxNullDateTime so it's consistent
1473 with the rest of the "empty/invalid/null" global objects?
1475 const wxDateTime wxDefaultDateTime
;
1480 @class wxDateTimeWorkDays
1482 @todo Write wxDateTimeWorkDays documentation.
1487 class wxDateTimeWorkDays
1498 This class is a "logical time span" and is useful for implementing program
1499 logic for such things as "add one month to the date" which, in general,
1500 doesn't mean to add 60*60*24*31 seconds to it, but to take the same date
1501 the next month (to understand that this is indeed different consider adding
1502 one month to Feb, 15 -- we want to get Mar, 15, of course).
1504 When adding a month to the date, all lesser components (days, hours, ...)
1505 won't be changed unless the resulting date would be invalid: for example,
1506 Jan 31 + 1 month will be Feb 28, not (non-existing) Feb 31.
1508 Because of this feature, adding and subtracting back again the same
1509 wxDateSpan will @b not, in general, give back the original date: Feb 28 - 1
1510 month will be Jan 28, not Jan 31!
1512 wxDateSpan objects can be either positive or negative. They may be
1513 multiplied by scalars which multiply all deltas by the scalar: i.e.
1514 2*(1 month and 1 day) is 2 months and 2 days. They can be added together
1515 with wxDateTime or wxTimeSpan, but the type of result is different for each
1518 @warning If you specify both weeks and days, the total number of days added
1519 will be 7*weeks + days! See also GetTotalDays().
1521 Equality operators are defined for wxDateSpans. Two wxDateSpans are equal
1522 if and only if they both give the same target date when added to @b every
1523 source date. Thus wxDateSpan::Months(1) is not equal to
1524 wxDateSpan::Days(30), because they don't give the same date when added to
1525 Feb 1st. But wxDateSpan::Days(14) is equal to wxDateSpan::Weeks(2).
1527 Finally, notice that for adding hours, minutes and so on you don't need
1528 this class at all: wxTimeSpan will do the job because there are no
1529 subtleties associated with those (we don't support leap seconds).
1534 @see @ref overview_datetime, wxDateTime
1540 Constructs the date span object for the given number of years, months,
1541 weeks and days. Note that the weeks and days add together if both are
1544 wxDateSpan(int years
= 0, int months
= 0, int weeks
= 0, int days
= 0);
1547 Returns the sum of two date spans.
1549 @return A new wxDateSpan object with the result.
1551 wxDateSpan
Add(const wxDateSpan
& other
) const;
1553 Adds the given wxDateSpan to this wxDateSpan and returns a reference
1556 wxDateSpan
& Add(const wxDateSpan
& other
);
1559 Returns a date span object corresponding to one day.
1563 static wxDateSpan
Day();
1566 Returns a date span object corresponding to the given number of days.
1570 static wxDateSpan
Days(int days
);
1573 Returns the number of days (not counting the weeks component) in this
1578 int GetDays() const;
1581 Returns the number of the months (not counting the years) in this date
1584 int GetMonths() const;
1587 Returns the combined number of days in this date span, counting both
1588 weeks and days. This doesn't take months or years into account.
1590 @see GetWeeks(), GetDays()
1592 int GetTotalDays() const;
1595 Returns the number of weeks in this date span.
1599 int GetWeeks() const;
1602 Returns the number of years in this date span.
1604 int GetYears() const;
1607 Returns a date span object corresponding to one month.
1611 static wxDateSpan
Month();
1614 Returns a date span object corresponding to the given number of months.
1618 static wxDateSpan
Months(int mon
);
1621 Returns the product of the date span by the specified @a factor. The
1622 product is computed by multiplying each of the components by the
1625 @return A new wxDateSpan object with the result.
1627 wxDateSpan
Multiply(int factor
) const;
1629 Multiplies this date span by the specified @a factor. The product is
1630 computed by multiplying each of the components by the @a factor.
1632 @return A reference to this wxDateSpan object modified in place.
1634 wxDateSpan
& Multiply(int factor
);
1637 Changes the sign of this date span.
1644 Returns a date span with the opposite sign.
1648 wxDateSpan
Negate() const;
1651 Sets the number of days (without modifying any other components) in
1654 wxDateSpan
& SetDays(int n
);
1657 Sets the number of months (without modifying any other components) in
1660 wxDateSpan
& SetMonths(int n
);
1663 Sets the number of weeks (without modifying any other components) in
1666 wxDateSpan
& SetWeeks(int n
);
1669 Sets the number of years (without modifying any other components) in
1672 wxDateSpan
& SetYears(int n
);
1675 Returns the difference of two date spans.
1677 @return A new wxDateSpan object with the result.
1679 wxDateSpan
Subtract(const wxDateSpan
& other
) const;
1681 Subtracts the given wxDateSpan to this wxDateSpan and returns a
1682 reference to itself.
1684 wxDateSpan
& Subtract(const wxDateSpan
& other
);
1687 Returns a date span object corresponding to one week.
1691 static wxDateSpan
Week();
1694 Returns a date span object corresponding to the given number of weeks.
1698 static wxDateSpan
Weeks(int weeks
);
1701 Returns a date span object corresponding to one year.
1705 static wxDateSpan
Year();
1708 Returns a date span object corresponding to the given number of years.
1712 static wxDateSpan
Years(int years
);
1715 Adds the given wxDateSpan to this wxDateSpan and returns the result.
1717 wxDateSpan
& operator+=(const wxDateSpan
& other
);
1720 Subtracts the given wxDateSpan to this wxDateSpan and returns the
1723 wxDateSpan
& operator-=(const wxDateSpan
& other
);
1726 Changes the sign of this date span.
1730 wxDateSpan
& operator-();
1733 Multiplies this date span by the specified @a factor. The product is
1734 computed by multiplying each of the components by the @a factor.
1736 @return A reference to this wxDateSpan object modified in place.
1738 wxDateSpan
& operator*=(int factor
);
1741 Returns @true if this date span is different from the other one.
1743 bool operator!=(const wxDateSpan
&) const;
1746 Returns @true if this date span is equal to the other one. Two date
1747 spans are considered equal if and only if they have the same number of
1748 years and months and the same total number of days (counting both days
1751 bool operator==(const wxDateSpan
&) const;
1759 wxTimeSpan class represents a time interval.
1764 @see @ref overview_datetime, wxDateTime
1770 Default constructor, constructs a zero timespan.
1774 Constructs timespan from separate values for each component, with the
1775 date set to 0. Hours are not restricted to 0-24 range, neither are
1776 minutes, seconds or milliseconds.
1778 wxTimeSpan(long hours
, long min
= 0, wxLongLong sec
= 0, wxLongLong msec
= 0);
1781 Returns the absolute value of the timespan: does not modify the object.
1783 wxTimeSpan
Abs() const;
1786 Returns the sum of two time spans.
1788 @return A new wxDateSpan object with the result.
1790 wxTimeSpan
Add(const wxTimeSpan
& diff
) const;
1792 Adds the given wxTimeSpan to this wxTimeSpan and returns a reference
1795 wxTimeSpan
& Add(const wxTimeSpan
& diff
);
1798 Returns the timespan for one day.
1800 static wxTimeSpan
Day();
1803 Returns the timespan for the given number of days.
1805 static wxTimeSpan
Days(long days
);
1808 Returns the string containing the formatted representation of the time
1809 span. The following format specifiers are allowed after %:
1811 - @c H - Number of Hours
1812 - @c M - Number of Minutes
1813 - @c S - Number of Seconds
1814 - @c l - Number of Milliseconds
1815 - @c D - Number of Days
1816 - @c E - Number of Weeks
1817 - @c % - The percent character
1819 Note that, for example, the number of hours in the description above is
1820 not well defined: it can be either the total number of hours (for
1821 example, for a time span of 50 hours this would be 50) or just the hour
1822 part of the time span, which would be 2 in this case as 50 hours is
1823 equal to 2 days and 2 hours.
1825 wxTimeSpan resolves this ambiguity in the following way: if there had
1826 been, indeed, the @c %D format specified preceding the @c %H, then it
1827 is interpreted as 2. Otherwise, it is 50.
1829 The same applies to all other format specifiers: if they follow a
1830 specifier of larger unit, only the rest part is taken, otherwise the
1833 wxString
Format(const wxString
& = wxDefaultTimeSpanFormat
) const;
1836 Returns the difference in number of days.
1838 int GetDays() const;
1841 Returns the difference in number of hours.
1843 int GetHours() const;
1846 Returns the difference in number of milliseconds.
1848 wxLongLong
GetMilliseconds() const;
1851 Returns the difference in number of minutes.
1853 int GetMinutes() const;
1856 Returns the difference in number of seconds.
1858 wxLongLong
GetSeconds() const;
1861 Returns the internal representation of timespan.
1863 wxLongLong
GetValue() const;
1866 Returns the difference in number of weeks.
1868 int GetWeeks() const;
1871 Returns the timespan for one hour.
1873 static wxTimeSpan
Hour();
1876 Returns the timespan for the given number of hours.
1878 static wxTimeSpan
Hours(long hours
);
1881 Returns @true if two timespans are equal.
1883 bool IsEqualTo(const wxTimeSpan
& ts
) const;
1886 Compares two timespans: works with the absolute values, i.e. -2 hours
1887 is longer than 1 hour. Also, it will return @false if the timespans are
1888 equal in absolute value.
1890 bool IsLongerThan(const wxTimeSpan
& ts
) const;
1893 Returns @true if the timespan is negative.
1895 bool IsNegative() const;
1898 Returns @true if the timespan is empty.
1900 bool IsNull() const;
1903 Returns @true if the timespan is positive.
1905 bool IsPositive() const;
1908 Compares two timespans: works with the absolute values, i.e. 1 hour is
1909 shorter than -2 hours. Also, it will return @false if the timespans are
1910 equal in absolute value.
1912 bool IsShorterThan(const wxTimeSpan
& ts
) const;
1915 Returns the timespan for one millisecond.
1917 static wxTimeSpan
Millisecond();
1920 Returns the timespan for the given number of milliseconds.
1922 static wxTimeSpan
Milliseconds(wxLongLong ms
);
1925 Returns the timespan for one minute.
1927 static wxTimeSpan
Minute();
1930 Returns the timespan for the given number of minutes.
1932 static wxTimeSpan
Minutes(long min
);
1935 Returns the product of this time span by @a n.
1937 @return A new wxTimeSpan object with the result.
1939 wxTimeSpan
Multiply(int n
) const;
1941 Multiplies this time span by @a n.
1943 @return A reference to this wxTimeSpan object modified in place.
1945 wxTimeSpan
& Multiply(int n
);
1948 Negate the value of the timespan.
1955 Returns timespan with inverted sign.
1959 wxTimeSpan
Negate() const;
1962 Returns the timespan for one second.
1964 static wxTimeSpan
Second();
1967 Returns the timespan for the given number of seconds.
1969 static wxTimeSpan
Seconds(wxLongLong sec
);
1972 Returns the difference of two time spans.
1974 @return A new wxDateSpan object with the result.
1976 wxTimeSpan
Subtract(const wxTimeSpan
& diff
) const;
1978 Subtracts the given wxTimeSpan to this wxTimeSpan and returns a
1979 reference to itself.
1981 wxTimeSpan
& Subtract(const wxTimeSpan
& diff
);
1984 Returns the timespan for one week.
1986 static wxTimeSpan
Week();
1989 Returns the timespan for the given number of weeks.
1991 static wxTimeSpan
Weeks(long weeks
);
1994 Adds the given wxTimeSpan to this wxTimeSpan and returns the result.
1996 wxTimeSpan
& operator+=(const wxTimeSpan
& diff
);
1999 Multiplies this time span by @a n.
2001 @return A reference to this wxTimeSpan object modified in place.
2003 wxTimeSpan
& operator*=(int n
);
2006 Negate the value of the timespan.
2010 wxTimeSpan
& operator-();
2013 Subtracts the given wxTimeSpan to this wxTimeSpan and returns the
2016 wxTimeSpan
& operator-=(const wxTimeSpan
& diff
);
2022 @class wxDateTimeHolidayAuthority
2024 @todo Write wxDateTimeHolidayAuthority documentation.
2029 class wxDateTimeHolidayAuthority