]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/datetime.h
Fix compilo
[wxWidgets.git] / interface / datetime.h
index a41d180d8f0a79f011af73248137015d0089306e..c388f0b0b8775eb1dbd59263dc61b8c5020da90a 100644 (file)
@@ -1,6 +1,6 @@
 /////////////////////////////////////////////////////////////////////////////
 // Name:        datetime.h
-// Purpose:     documentation for wxDateTime class
+// Purpose:     interface of wxDateTime
 // Author:      wxWidgets team
 // RCS-ID:      $Id$
 // Licence:     wxWindows license
     @library{wxbase}
     @category{data}
 
-    @seealso
-    @ref overview_wxdatetimeoverview "Date classes overview", wxTimeSpan,
+    @stdobjects
+    ::wxDefaultDateTime
+
+    @see @ref overview_wxdatetimeoverview "Date classes overview", wxTimeSpan,
     wxDateSpan, wxCalendarCtrl
 */
 class wxDateTime
@@ -26,7 +28,7 @@ public:
         Same as @ref setdate() Set
     */
     wxDateTime(wxDateTime_t day, Month month = Inv_Month,
-               int Inv_Year, wxDateTime_t hour = 0,
+               int year = Inv_Year, wxDateTime_t hour = 0,
                wxDateTime_t minute = 0,
                wxDateTime_t second = 0,
                wxDateTime_t millisec = 0);
@@ -36,39 +38,39 @@ public:
         some more complicated calculations to find the answer are under the
         @ref overview_datetimecalculations "Calendar calculations" section.
         IsValid()
-        
+
         GetTicks()
-        
+
         GetCentury()
-        
+
         GetYear()
-        
+
         GetMonth()
-        
+
         GetDay()
-        
+
         GetWeekDay()
-        
+
         GetHour()
-        
+
         GetMinute()
-        
+
         GetSecond()
-        
+
         GetMillisecond()
-        
+
         GetDayOfYear()
-        
+
         GetWeekOfYear()
-        
+
         GetWeekOfMonth()
-        
+
         GetYearDay()
-        
+
         IsWorkDay()
-        
+
         IsGregorianDate()
-        
+
         GetAsDOS()
     */
 
@@ -78,7 +80,7 @@ public:
         Adds the given date span to this object.
     */
     wxDateTime Add(const wxDateSpan& diff);
-    wxDateTime Add(const wxDateSpan& diff);
+    const wxDateTime&  Add(const wxDateSpan& diff);
     wxDateTime operator+=(const wxDateSpan& diff);
     //@}
 
@@ -89,17 +91,17 @@ public:
         @ref getmodifiedjuliandaynumber() MJD or
         @ref getratadie() "Rata Die number" from it.
         @ref wxdatetimejdn() "wxDateTime(double jdn)"
-        
+
         @ref setjdn() "Set(double jdn)"
-        
+
         GetJulianDayNumber()
-        
+
         GetJDN()
-        
+
         GetModifiedJulianDayNumber()
-        
+
         GetMJD()
-        
+
         GetRataDie()
     */
 
@@ -111,33 +113,33 @@ public:
         All (non-const) functions in this section don't modify the time part of the
         wxDateTime -- they only work with the date part of it.
         SetToWeekDayInSameWeek()
-        
+
         GetWeekDayInSameWeek()
-        
+
         SetToNextWeekDay()
-        
+
         GetNextWeekDay()
-        
+
         SetToPrevWeekDay()
-        
+
         GetPrevWeekDay()
-        
+
         SetToWeekDay()
-        
+
         @ref wxDateTime::getweekday2 GetWeekDay
-        
+
         SetToLastWeekDay()
-        
+
         GetLastWeekDay()
-        
+
         SetToWeekOfYear()
-        
+
         SetToLastMonthDay()
-        
+
         GetLastMonthDay()
-        
+
         SetToYearDay()
-        
+
         GetYearDay()
     */
 
@@ -148,49 +150,49 @@ public:
         should use IsValid() method to check that the
         values were correct as constructors can not return an error code.
         @ref wxdatetimedef() wxDateTime
-        
+
         @ref wxdatetimetimet() wxDateTime(time_t)
-        
+
         @ref wxdatetimetm() "wxDateTime(struct tm)"
-        
+
         @ref wxdatetimejdn() "wxDateTime(double jdn)"
-        
+
         @ref wxdatetimetime() "wxDateTime(h, m, s, ms)"
-        
+
         @ref wxdatetimedate() "wxDateTime(day, mon, year, h, m, s, ms)"
-        
+
         SetToCurrent()
-        
+
         @ref settimet() Set(time_t)
-        
+
         @ref settm() "Set(struct tm)"
-        
+
         @ref setjdn() "Set(double jdn)"
-        
+
         @ref settime() "Set(h, m, s, ms)"
-        
+
         @ref setdate() "Set(day, mon, year, h, m, s, ms)"
-        
+
         @ref setfromdos() "SetFromDOS(unsigned long ddt)"
-        
+
         ResetTime()
-        
+
         SetYear()
-        
+
         SetMonth()
-        
+
         @ref setdate() SetDay
-        
+
         SetHour()
-        
+
         SetMinute()
-        
+
         SetSecond()
-        
+
         SetMillisecond()
-        
+
         @ref operatoreqtimet() operator=(time_t)
-        
+
         @ref operatoreqtm() "operator=(struct tm)"
     */
 
@@ -205,7 +207,7 @@ public:
     static int ConvertYearToBC(int year);
 
     /**
-        These functions carry out arithmetics on the wxDateTime
+        These functions carry out arithmetics() on the wxDateTime
         objects. As explained in the overview, either wxTimeSpan or wxDateSpan may be
         added to wxDateTime, hence all functions are overloaded to accept both
         arguments.
@@ -215,21 +217,21 @@ public:
         modifies the object to which it is applied. The operators -= and += are
         defined to be equivalent to the second forms of these functions.
         @ref addts() Add(wxTimeSpan)
-        
+
         @ref addds() Add(wxDateSpan)
-        
+
         @ref subtractts() Subtract(wxTimeSpan)
-        
+
         @ref subtractds() Subtract(wxDateSpan)
-        
+
         @ref subtractdt() Subtract(wxDateTime)
-        
+
         @ref addts() oparator+=(wxTimeSpan)
-        
+
         @ref addds() oparator+=(wxDateSpan)
-        
+
         @ref subtractts() oparator-=(wxTimeSpan)
-        
+
         @ref subtractds() oparator-=(wxDateSpan)
     */
 
@@ -238,19 +240,19 @@ public:
         There are several function to allow date comparison. To supplement them, a few
         global operators ,  etc taking wxDateTime are defined.
         IsEqualTo()
-        
+
         IsEarlierThan()
-        
+
         IsLaterThan()
-        
+
         IsStrictlyBetween()
-        
+
         IsBetween()
-        
+
         IsSameDate()
-        
+
         IsSameTime()
-        
+
         IsEqualUpTo()
     */
 
@@ -261,17 +263,17 @@ public:
         It also accepts a few wxWidgets-specific extensions: you can optionally specify
         the width of the field to follow using @c printf(3)-like syntax and the
         format specification @c %l can be used to get the number of milliseconds.
-        
+
         @see ParseFormat()
     */
     wxString Format(const wxChar* format = wxDefaultDateTimeFormat,
-                    const TimeZone& tz = Local);
+                    const TimeZone& tz = Local) const;
 
     /**
         Identical to calling Format() with @c "%x"
         argument (which means 'preferred date representation for the current locale').
     */
-    wxString FormatDate();
+    wxString FormatDate() const;
 
     /**
         Returns the combined date-time representation in the ISO 8601 format
@@ -279,29 +281,29 @@ public:
         result exactly corresponding to the ISO standard, but it can also be useful to
         use a space as seprator if a more human-readable combined date-time
         representation is needed.
-        
+
         @see FormatISODate(), FormatISOTime(),
              ParseISOCombined()
     */
-    wxString FormatISOCombined(char sep = 'T');
+    wxString FormatISOCombined(char sep = 'T') const;
 
     /**
         This function returns the date representation in the ISO 8601 format
         (YYYY-MM-DD).
     */
-    wxString FormatISODate();
+    wxString FormatISODate() const;
 
     /**
         This function returns the time representation in the ISO 8601 format
         (HH:MM:SS).
     */
-    wxString FormatISOTime();
+    wxString FormatISOTime() const;
 
     /**
         Identical to calling Format() with @c "%X"
         argument (which means 'preferred time representation for the current locale').
     */
-    wxString FormatTime();
+    wxString FormatTime() const;
 
     /**
         Transform the date from the given time zone to the local one. If @a noDST is
@@ -309,7 +311,7 @@ public:
         Returns the date in the local time zone.
     */
     wxDateTime FromTimezone(const TimeZone& tz,
-                            bool noDST = false);
+                            bool noDST = false) const;
 
     /**
         Returns the translations of the strings @c AM and @c PM used for time
@@ -323,13 +325,13 @@ public:
         DOS
         format.
     */
-    unsigned long GetAsDOS();
+    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,
@@ -338,12 +340,12 @@ public:
     /**
         Returns the century of this date.
     */
-    int GetCentury(const TimeZone& tz = Local);
+    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();
@@ -361,27 +363,28 @@ public:
     /**
         Returns the object having the same date component as this one but time of
         00:00:00.
-        This function is new since wxWidgets version 2.8.2
-        
+
+        @wxsince{2.8.2}
+
         @see ResetTime()
     */
-    wxDateTime GetDateOnly();
+    wxDateTime GetDateOnly() const;
 
     /**
         Returns the day in the given timezone (local one by default).
     */
-    wxDateTime_t GetDay(const TimeZone& tz = Local);
+    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).
     */
-    wxDateTime_t GetDayOfYear(const TimeZone& tz = Local);
+    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,
@@ -390,27 +393,27 @@ public:
     /**
         Returns the hour in the given timezone (local one by default).
     */
-    wxDateTime_t GetHour(const TimeZone& tz = Local);
+    short unsigned int GetHour(const TimeZone& tz = Local) const;
 
     /**
         Synonym for GetJulianDayNumber().
     */
-    double GetJDN();
+    double GetJDN() const;
 
     /**
         Returns the @ref setjdn() JDN corresponding to this date. Beware
         of rounding errors!
-        
+
         @see GetModifiedJulianDayNumber()
     */
-    double GetJulianDayNumber();
+    double GetJulianDayNumber() const;
 
     /**
         Returns the copy of this object to which
         SetToLastMonthDay() was applied.
     */
     wxDateTime GetLastMonthDay(Month month = Inv_Month,
-                               int year = Inv_Year);
+                               int year = Inv_Year) const;
 
     /**
         Returns the copy of this object to which
@@ -423,17 +426,17 @@ public:
     /**
         Synonym for GetModifiedJulianDayNumber().
     */
-    double GetMJD();
+    double GetMJD() const;
 
     /**
         Returns the milliseconds in the given timezone (local one by default).
     */
-    wxDateTime_t GetMillisecond(const TimeZone& tz = Local);
+    short unsigned int GetMillisecond(const TimeZone& tz = Local) const;
 
     /**
         Returns the minute in the given timezone (local one by default).
     */
-    wxDateTime_t GetMinute(const TimeZone& tz = Local);
+    short unsigned int GetMinute(const TimeZone& tz = Local) const;
 
     /**
         Returns the @e Modified Julian Day Number (MJD) which is, by definition,
@@ -441,17 +444,17 @@ public:
         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();
+    double GetModifiedJulianDayNumber() const;
 
     /**
         Returns the month in the given timezone (local one by default).
     */
-    Month GetMonth(const TimeZone& tz = Local);
+    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,
@@ -461,7 +464,7 @@ public:
         Returns the copy of this object to which
         SetToNextWeekDay() was applied.
     */
-    wxDateTime GetNextWeekDay(WeekDay weekday);
+    wxDateTime GetNextWeekDay(WeekDay weekday) const;
 
     //@{
     /**
@@ -480,7 +483,7 @@ public:
         Returns the copy of this object to which
         SetToPrevWeekDay() was applied.
     */
-    wxDateTime GetPrevWeekDay(WeekDay weekday);
+    wxDateTime GetPrevWeekDay(WeekDay weekday) const;
 
     /**
         Return the @e Rata Die number of this date.
@@ -488,18 +491,18 @@ public:
         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();
+    double GetRataDie() const;
 
     /**
         Returns the seconds in the given timezone (local one by default).
     */
-    wxDateTime_t GetSecond(const TimeZone& tz = Local);
+    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();
+    time_t GetTicks() const;
 
     /**
         Returns the current time.
@@ -509,7 +512,7 @@ public:
     /**
         Returns broken down representation of the date and time.
     */
-    Tm GetTm(const TimeZone& tz = Local);
+    Tm GetTm(const TimeZone& tz = Local) const;
 
     /**
         Returns the current time broken down. Note that this function returns a
@@ -527,7 +530,7 @@ public:
     */
     wxDateTime GetWeekDay(WeekDay weekday, int n = 1,
                           Month month = Inv_Month,
-                          int year = Inv_Year);
+                          int year = Inv_Year) const;
 
     /**
         Returns the copy of this object to which
@@ -535,12 +538,12 @@ public:
         applied.
     */
     wxDateTime GetWeekDayInSameWeek(WeekDay weekday,
-                                    WeekFlags flags = Monday_First);
+                                    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,
@@ -553,7 +556,7 @@ public:
         @ref overview_wxdatetime "week start" conventions.
     */
     wxDateTime_t GetWeekOfMonth(WeekFlags flags = Monday_First,
-                                const TimeZone& tz = Local);
+                                const TimeZone& tz = Local) const;
 
     /**
         Returns the number of the week of the year this date is in. The first week of
@@ -568,31 +571,31 @@ public:
         applies to the weeks starting on Monday only.
     */
     wxDateTime_t GetWeekOfYear(WeekFlags flags = Monday_First,
-                               const TimeZone& tz = Local);
+                               const TimeZone& tz = Local) const;
 
     /**
         Returns the year in the given timezone (local one by default).
     */
-    int GetYear(const TimeZone& tz = Local);
+    int GetYear(const TimeZone& tz = Local) const;
 
     /**
         Returns the copy of this object to which
         SetToYearDay() was applied.
     */
-    wxDateTime GetYearDay(wxDateTime_t yday);
+    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);
+    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);
+    int IsDST(Country country = Country_Default) const;
 
     /**
         Returns @true if DST was used n the given year (the current one by
@@ -604,31 +607,31 @@ public:
     /**
         Returns @true if this date precedes the given one.
     */
-    bool IsEarlierThan(const wxDateTime& datetime);
+    bool IsEarlierThan(const wxDateTime& datetime) const;
 
     /**
         Returns @true if the two dates are strictly identical.
     */
-    bool IsEqualTo(const wxDateTime& datetime);
+    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);
+    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);
+    bool IsGregorianDate(GregorianAdoption country = Gr_Standard) const;
 
     /**
         Returns @true if this date is later than the given one.
     */
-    bool IsLaterThan(const wxDateTime& datetime);
+    bool IsLaterThan(const wxDateTime& datetime) const;
 
     /**
         Returns @true if the @a year is a leap one in the specified calendar.
@@ -640,25 +643,25 @@ public:
     /**
         Returns @true if the date is the same without comparing the time parts.
     */
-    bool IsSameDate(const wxDateTime& dt);
+    bool IsSameDate(const wxDateTime& dt) const;
 
     /**
         Returns @true if the time is the same (although dates may differ).
     */
-    bool IsSameTime(const wxDateTime& dt);
+    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 wxDateTime& t2) const;
 
     /**
         Returns @true if the object represents a valid time moment.
     */
-    bool IsValid();
+    bool IsValid() const;
 
     /**
         This function returns @true if the specified (or default) country is one
@@ -670,7 +673,7 @@ public:
     /**
         Returns @true is this day is not a holiday in the given country.
     */
-    bool IsWorkDay(Country country = Country_Default);
+    bool IsWorkDay(Country country = Country_Default) const;
 
     /**
         Same as FromTimezone() but modifies the object
@@ -690,16 +693,16 @@ public:
         This is the same as calling MakeTimezone() with
         the argument @c GMT0.
     */
-    wxDateTime MakeUTC(bool noDST = false);
+    wxDateTime& MakeUTC(bool noDST = false);
 
     /**
         Returns the object corresponding to the current time.
         Example:
-        
+
         Note that this function is accurate up to second:
         UNow() should be used for better precision
         (but it is less efficient and might not be available on all platforms).
-        
+
         @see Today()
     */
     static wxDateTime Now();
@@ -861,31 +864,31 @@ public:
         additional argument of wxString::const_iterator type in which, if it is not
         @NULL, an iterator pointing to the end of the scanned string part is returned.
         ParseFormat()
-        
+
         ParseDateTime()
-        
+
         ParseDate()
-        
+
         ParseTime()
-        
+
         ParseISODate()
-        
+
         ParseISOTime()
-        
+
         ParseISOCombined()
-        
+
         wxDateTime::ParseRfc822Date
-        
+
         Format()
-        
+
         FormatDate()
-        
+
         FormatTime()
-        
+
         FormatISOCombined()
-        
+
         FormatISODate()
-        
+
         FormatISOTime()
     */
 
@@ -893,7 +896,7 @@ public:
     /**
         Reset time to midnight (00:00:00) without changing the date.
     */
-    wxDateTime ResetTime();
+    wxDateTime& ResetTime();
 
     /**
         Sets the date and time from the parameters.
@@ -910,7 +913,7 @@ public:
         calculations, date formatting and other things.
         The possible values for @a country parameter are enumerated in
         @ref overview_wxdatetime "wxDateTime constants section".
-        
+
         @see GetCountry()
     */
     static void SetCountry(Country country);
@@ -918,7 +921,7 @@ public:
     /**
         Sets the day without changing other date components.
     */
-    wxDateTime SetDay(wxDateTime_t day);
+    wxDateTime& SetDay(short unsigned int);
 
     /**
         Sets the date from the date and time in
@@ -930,33 +933,33 @@ public:
     /**
         Sets the hour without changing other date components.
     */
-    wxDateTime SetHour(wxDateTime_t hour);
+    wxDateTime& SetHour(short unsigned int);
 
     /**
         Sets the millisecond without changing other date components.
     */
-    wxDateTime SetMillisecond(wxDateTime_t millisecond);
+    wxDateTime& SetMillisecond(short unsigned int);
 
     /**
         Sets the minute without changing other date components.
     */
-    wxDateTime SetMinute(wxDateTime_t minute);
+    wxDateTime& SetMinute(short unsigned int);
 
     /**
         Sets the month without changing other date components.
     */
-    wxDateTime SetMonth(Month month);
+    wxDateTime& SetMonth(Month month);
 
     /**
         Sets the second without changing other date components.
     */
-    wxDateTime SetSecond(wxDateTime_t second);
+    wxDateTime& SetSecond(short unsigned int);
 
     /**
         Sets the date and time of to the current values. Same as assigning the result
         of Now() to this object.
     */
-    wxDateTime SetToCurrent();
+    wxDateTime& SetToCurrent();
 
     /**
         Sets the date to the last day in the specified month (the current one by
@@ -980,14 +983,14 @@ public:
         date.
         Returns the reference to the modified object itself.
     */
-    wxDateTime SetToNextWeekDay(WeekDay weekday);
+    wxDateTime& SetToNextWeekDay(WeekDay weekday);
 
     /**
         Sets the date so that it will be the last @a weekday before the current
         date.
         Returns the reference to the modified object itself.
     */
-    wxDateTime SetToPrevWeekDay(WeekDay weekday);
+    wxDateTime& SetToPrevWeekDay(WeekDay weekday);
 
     /**
         Sets the date to the @e n-th @a weekday in the given month of the given
@@ -1031,12 +1034,12 @@ public:
         the other ones.
         Returns the reference to the modified object itself.
     */
-    wxDateTime SetToYearDay(wxDateTime_t yday);
+    wxDateTime& SetToYearDay(short unsigned int);
 
     /**
         Sets the year without changing other date components.
     */
-    wxDateTime SetYear(int year);
+    wxDateTime& SetYear(int year);
 
     /**
         For convenience, all static functions are collected here. These functions
@@ -1046,43 +1049,43 @@ public:
         Please note that although several function accept an extra @e Calendar
         parameter, it is currently ignored as only the Gregorian calendar is
         supported. Future versions will support other calendars.
-        
+
         SetCountry()
-        
+
         GetCountry()
-        
+
         IsWestEuropeanCountry()
-        
+
         GetCurrentYear()
-        
+
         ConvertYearToBC()
-        
+
         GetCurrentMonth()
-        
+
         IsLeapYear()
-        
+
         @ref getcenturystatic() GetCentury
-        
+
         GetNumberOfDays()
-        
+
         GetNumberOfDays()
-        
+
         GetMonthName()
-        
+
         GetWeekDayName()
-        
+
         GetAmPmStrings()
-        
+
         IsDSTApplicable()
-        
+
         GetBeginDST()
-        
+
         GetEndDST()
-        
+
         Now()
-        
+
         UNow()
-        
+
         Today()
     */
 
@@ -1091,27 +1094,27 @@ public:
         Subtracts another date from this one and returns the difference between them
         as wxTimeSpan.
     */
-    wxTimeSpan Subtract(const wxDateTime& dt);
+    wxTimeSpan Subtract(const wxDateTime& dt) const;
 
     /**
         Please see the @ref overview_tdatetimezones "time zone overview" for more
         information about time zones. Normally, these functions should be rarely used.
         FromTimezone()
-        
+
         ToTimezone()
-        
+
         MakeTimezone()
-        
+
         MakeFromTimezone()
-        
+
         ToUTC()
-        
+
         MakeUTC()
-        
+
         GetBeginDST()
-        
+
         GetEndDST()
-        
+
         IsDST()
     */
 
@@ -1121,18 +1124,18 @@ public:
         DST adjustments will be made.
         Returns the date in the new time zone.
     */
-    wxDateTime ToTimezone(const TimeZone& tz, bool noDST = false);
+    wxDateTime ToTimezone(const TimeZone& tz, bool noDST = false) const;
 
     /**
         This is the same as calling ToTimezone() with
         the argument @c GMT0.
     */
-    wxDateTime ToUTC(bool noDST = false);
+    wxDateTime ToUTC(bool noDST = false) const;
 
     /**
         Returns the object corresponding to the midnight of the current day (i.e. the
         same as Now(), but the time part is set to 0).
-        
+
         @see Now()
     */
     static wxDateTime Today();
@@ -1141,7 +1144,7 @@ public:
         Returns the object corresponding to the current time including the
         milliseconds if a function to get time with such precision is available on the
         current platform (supported under most Unices and Win32).
-        
+
         @see Now()
     */
     static wxDateTime UNow();
@@ -1152,6 +1155,15 @@ public:
     wxDateTime operator(const struct tm& tm);
 };
 
+/**
+    Global instance of an empty wxDateTime object.
+
+    @todo wouldn't be better to rename it wxNullDateTime as for the rest of wx global objects
+          which are initialized to an empty value?
+*/
+wxDateTime wxDefaultDateTime;
+
+
 
 /**
     @class wxDateTimeWorkDays
@@ -1168,6 +1180,7 @@ public:
 };
 
 
+
 /**
     @class wxDateSpan
     @wxheader{datetime.h}
@@ -1210,8 +1223,7 @@ public:
     @library{wxbase}
     @category{data}
 
-    @seealso
-    @ref overview_wxdatetimeoverview "Date classes overview", wxDateTime
+    @see @ref overview_wxdatetimeoverview "Date classes overview", wxDateTime
 */
 class wxDateSpan
 {
@@ -1229,20 +1241,20 @@ public:
         second and third ones modify this object in place.
     */
     wxDateSpan Add(const wxDateSpan& other);
-    wxDateSpan Add(const wxDateSpan& other);
+    const wxDateSpan&  Add(const wxDateSpan& other);
     wxDateSpan operator+=(const wxDateSpan& other);
     //@}
 
     /**
         Returns a date span object corresponding to one day.
-        
+
         @see Days()
     */
     static wxDateSpan Day();
 
     /**
         Returns a date span object corresponding to the given number of days.
-        
+
         @see Day()
     */
     static wxDateSpan Days(int days);
@@ -1250,46 +1262,46 @@ public:
     /**
         Returns the number of days (only, that it not counting the weeks component!)
         in this date span.
-        
+
         @see GetTotalDays()
     */
-    int GetDays();
+    int GetDays() const;
 
     /**
         Returns the number of the months (not counting the years) in this date span.
     */
-    int GetMonths();
+    int GetMonths() const;
 
     /**
         Returns the combined number of days in this date span, counting both weeks and
         days. It still doesn't take neither months nor years into the account.
-        
+
         @see GetWeeks(), GetDays()
     */
-    int GetTotalDays();
+    int GetTotalDays() const;
 
     /**
         Returns the number of weeks in this date span.
-        
+
         @see GetTotalDays()
     */
-    int GetWeeks();
+    int GetWeeks() const;
 
     /**
         Returns the number of years in this date span.
     */
-    int GetYears();
+    int GetYears() const;
 
     /**
         Returns a date span object corresponding to one month.
-        
+
         @see Months()
     */
     static wxDateSpan Month();
 
     /**
         Returns a date span object corresponding to the given number of months.
-        
+
         @see Month()
     */
     static wxDateSpan Months(int mon);
@@ -1302,14 +1314,14 @@ public:
         object in place.
     */
     wxDateSpan Multiply(int factor);
-    wxDateSpan Multiply(int factor);
+    const wxDateSpan&  Multiply(int factor);
     wxDateSpan operator*=(int factor);
     //@}
 
     //@{
     /**
         Changes the sign of this date span.
-        
+
         @see Negate()
     */
     wxDateSpan Neg();
@@ -1318,34 +1330,34 @@ public:
 
     /**
         Returns the date span with the opposite sign.
-        
+
         @see Neg()
     */
-    wxDateSpan Negate();
+    wxDateSpan Negate() const;
 
     /**
         Sets the number of days (without modifying any other components) in this date
         span.
     */
-    wxDateSpan SetDays(int n);
+    wxDateSpan& SetDays(int n);
 
     /**
         Sets the number of months (without modifying any other components) in this
         date span.
     */
-    wxDateSpan SetMonths(int n);
+    wxDateSpan& SetMonths(int n);
 
     /**
         Sets the number of weeks (without modifying any other components) in this date
         span.
     */
-    wxDateSpan SetWeeks(int n);
+    wxDateSpan& SetWeeks(int n);
 
     /**
         Sets the number of years (without modifying any other components) in this date
         span.
     */
-    wxDateSpan SetYears(int n);
+    wxDateSpan& SetYears(int n);
 
     //@{
     /**
@@ -1353,34 +1365,34 @@ public:
         object, the second and third ones modify this object in place.
     */
     wxDateSpan Subtract(const wxDateSpan& other);
-    wxDateSpan Subtract(const wxDateSpan& other);
+    const wxDateSpan&  Subtract(const wxDateSpan& other);
     wxDateSpan operator+=(const wxDateSpan& other);
     //@}
 
     /**
         Returns a date span object corresponding to one week.
-        
+
         @see Weeks()
     */
     static wxDateSpan Week();
 
     /**
         Returns a date span object corresponding to the given number of weeks.
-        
+
         @see Week()
     */
     static wxDateSpan Weeks(int weeks);
 
     /**
         Returns a date span object corresponding to one year.
-        
+
         @see Years()
     */
     static wxDateSpan Year();
 
     /**
         Returns a date span object corresponding to the given number of years.
-        
+
         @see Year()
     */
     static wxDateSpan Years(int years);
@@ -1388,17 +1400,18 @@ public:
     /**
         Returns @true if this date span is different from the other one.
     */
-    bool operator!=(wxDateSpan& other);
+    bool operator!=(const wxDateSpan&) const;
 
     /**
         Returns @true if this date span is equal to the other one. Two date spans
         are considered equal if and only if they have the same number of years and
         months and the same total number of days (counting both days and weeks).
     */
-    bool operator==(wxDateSpan& other);
+    bool operator==(const wxDateSpan&) const;
 };
 
 
+
 /**
     @class wxTimeSpan
     @wxheader{datetime.h}
@@ -1408,8 +1421,7 @@ public:
     @library{wxbase}
     @category{data}
 
-    @seealso
-    @ref overview_wxdatetimeoverview "Date classes overview", wxDateTime
+    @see @ref overview_wxdatetimeoverview "Date classes overview", wxDateTime
 */
 class wxTimeSpan
 {
@@ -1428,19 +1440,19 @@ public:
         Returns the absolute value of the timespan: does not modify the
         object.
     */
-    wxTimeSpan Abs();
+    wxTimeSpan Abs() const;
 
     /**
         GetSeconds()
-        
+
         GetMinutes()
-        
+
         GetHours()
-        
+
         GetDays()
-        
+
         GetWeeks()
-        
+
         GetValue()
     */
 
@@ -1450,7 +1462,7 @@ public:
         Returns the sum of two timespans.
     */
     wxTimeSpan Add(const wxTimeSpan& diff);
-    wxTimeSpan Add(const wxTimeSpan& diff);
+    const wxTimeSpan&  Add(const wxTimeSpan& diff);
     wxTimeSpan operator+=(const wxTimeSpan& diff);
     //@}
 
@@ -1472,35 +1484,35 @@ public:
     /**
         Returns the string containing the formatted representation of the time span.
         The following format specifiers are allowed after %:
-        
+
         H
-        
+
         number of @b Hours
-        
+
         M
-        
+
         number of @b Minutes
-        
+
         S
-        
+
         number of @b Seconds
-        
+
         l
-        
+
         number of mi@b lliseconds
-        
+
         D
-        
+
         number of @b Days
-        
+
         E
-        
+
         number of w@b Eeks
-        
+
         %
-        
+
         the percent character
-        
+
         Note that, for example, the number of hours in the description above is not
         well defined: it can be either the total number of hours (for example, for a
         time span of 50 hours this would be 50) or just the hour part of the time
@@ -1512,7 +1524,7 @@ public:
         The same applies to all other format specifiers: if they follow a specifier of
         larger unit, only the rest part is taken, otherwise the full value is used.
     */
-    wxString Format(const wxChar* format = wxDefaultTimeSpanFormat);
+    wxString Format(const wxString& = wxDefaultTimeSpanFormat) const;
 
     /**
         Format()
@@ -1522,37 +1534,37 @@ public:
     /**
         Returns the difference in number of days.
     */
-    int GetDays();
+    int GetDays() const;
 
     /**
         Returns the difference in number of hours.
     */
-    int GetHours();
+    int GetHours() const;
 
     /**
         Returns the difference in number of milliseconds.
     */
-    wxLongLong GetMilliseconds();
+    wxLongLong GetMilliseconds() const;
 
     /**
         Returns the difference in number of minutes.
     */
-    int GetMinutes();
+    int GetMinutes() const;
 
     /**
         Returns the difference in number of seconds.
     */
-    wxLongLong GetSeconds();
+    wxLongLong GetSeconds() const;
 
     /**
         Returns the internal representation of timespan.
     */
-    wxLongLong GetValue();
+    wxLongLong GetValue() const;
 
     /**
         Returns the difference in number of weeks.
     */
-    int GetWeeks();
+    int GetWeeks() const;
 
     /**
         Returns the timespan for one hour.
@@ -1567,36 +1579,36 @@ public:
     /**
         Returns @true if two timespans are equal.
     */
-    bool IsEqualTo(const wxTimeSpan& ts);
+    bool IsEqualTo(const wxTimeSpan& ts) const;
 
     /**
         Compares two timespans: works with the absolute values, i.e. -2
         hours is longer than 1 hour. Also, it will return @false if
         the timespans are equal in absolute value.
     */
-    bool IsLongerThan(const wxTimeSpan& ts);
+    bool IsLongerThan(const wxTimeSpan& ts) const;
 
     /**
         Returns @true if the timespan is negative.
     */
-    bool IsNegative();
+    bool IsNegative() const;
 
     /**
         Returns @true if the timespan is empty.
     */
-    bool IsNull();
+    bool IsNull() const;
 
     /**
         Returns @true if the timespan is positive.
     */
-    bool IsPositive();
+    bool IsPositive() const;
 
     /**
         Compares two timespans: works with the absolute values, i.e. 1
         hour is shorter than -2 hours. Also, it will return @false if
         the timespans are equal in absolute value.
     */
-    bool IsShorterThan(const wxTimeSpan& ts);
+    bool IsShorterThan(const wxTimeSpan& ts) const;
 
     /**
         Returns the timespan for one millisecond.
@@ -1623,7 +1635,7 @@ public:
         Multiplies timespan by a scalar.
     */
     wxTimeSpan Multiply(int n);
-    wxTimeSpan Multiply(int n);
+    const wxTimeSpan&  Multiply(int n);
     wxTimeSpan operator*=(int n);
     //@}
 
@@ -1638,19 +1650,19 @@ public:
     /**
         Returns timespan with inverted sign.
     */
-    wxTimeSpan Negate();
+    wxTimeSpan Negate() const;
 
     /**
         Add()
-        
+
         Subtract()
-        
+
         Multiply()
-        
+
         Negate()
-        
+
         Neg()
-        
+
         Abs()
     */
 
@@ -1667,27 +1679,27 @@ public:
 
     /**
         Milliseconds()
-        
+
         Millisecond()
-        
+
         Seconds()
-        
+
         Second()
-        
+
         Minutes()
-        
+
         Minute()
-        
+
         Hours()
-        
+
         Hour()
-        
+
         Days()
-        
+
         Day()
-        
+
         Weeks()
-        
+
         Week()
     */
 
@@ -1697,21 +1709,21 @@ public:
         Returns the difference of two timespans.
     */
     wxTimeSpan Subtract(const wxTimeSpan& diff);
-    wxTimeSpan Subtract(const wxTimeSpan& diff);
+    const wxTimeSpan&  Subtract(const wxTimeSpan& diff);
     wxTimeSpan operator-=(const wxTimeSpan& diff);
     //@}
 
     /**
         IsNull()
-        
+
         IsPositive()
-        
+
         IsNegative()
-        
+
         IsEqualTo()
-        
+
         IsLongerThan()
-        
+
         IsShorterThan()
     */
 
@@ -1728,6 +1740,7 @@ public:
 };
 
 
+
 /**
     @class wxDateTimeHolidayAuthority
     @wxheader{datetime.h}
@@ -1741,3 +1754,4 @@ class wxDateTimeHolidayAuthority
 public:
 
 };
+