// some symbolic names for TZ
// Europe
- WET = GMT0, // Western Europe Time
- WEST = GMT1, // Western Europe Summer Time
- CET = GMT1, // Central Europe Time
- CEST = GMT2, // Central Europe Summer Time
- EET = GMT2, // Eastern Europe Time
- EEST = GMT3, // Eastern Europe Summer Time
- MSK = GMT3, // Moscow Time
- MSD = GMT4, // Moscow Summer Time
+ WET = GMT0, // Western Europe Time
+ WEST = GMT1, // Western Europe Summer Time
+ CET = GMT1, // Central Europe Time
+ CEST = GMT2, // Central Europe Summer Time
+ EET = GMT2, // Eastern Europe Time
+ EEST = GMT3, // Eastern Europe Summer Time
+ MSK = GMT3, // Moscow Time
+ MSD = GMT4, // Moscow Summer Time
// US and Canada
- AST = GMT_4, // Atlantic Standard Time
- ADT = GMT_3, // Atlantic Daylight Time
- EST = GMT_5, // Eastern Standard Time
- EDT = GMT_4, // Eastern Daylight Saving Time
- CST = GMT_6, // Central Standard Time
- CDT = GMT_5, // Central Daylight Saving Time
- MST = GMT_7, // Mountain Standard Time
- MDT = GMT_6, // Mountain Daylight Saving Time
- PST = GMT_8, // Pacific Standard Time
- PDT = GMT_7, // Pacific Daylight Saving Time
- HST = GMT_10, // Hawaiian Standard Time
- AKST = GMT_9, // Alaska Standard Time
- AKDT = GMT_8, // Alaska Daylight Saving Time
+ AST = GMT_4, // Atlantic Standard Time
+ ADT = GMT_3, // Atlantic Daylight Time
+ EST = GMT_5, // Eastern Standard Time
+ EDT = GMT_4, // Eastern Daylight Saving Time
+ CST = GMT_6, // Central Standard Time
+ CDT = GMT_5, // Central Daylight Saving Time
+ MST = GMT_7, // Mountain Standard Time
+ MDT = GMT_6, // Mountain Daylight Saving Time
+ PST = GMT_8, // Pacific Standard Time
+ PDT = GMT_7, // Pacific Daylight Saving Time
+ HST = GMT_10, // Hawaiian Standard Time
+ AKST = GMT_9, // Alaska Standard Time
+ AKDT = GMT_8, // Alaska Daylight Saving Time
// Australia
- A_WST = GMT8, // Western Standard Time
- A_CST = GMT13 + 1, // Central Standard Time (+9.5)
- A_EST = GMT10, // Eastern Standard Time
- A_ESST = GMT11, // Eastern Summer Time
+ A_WST = GMT8, // Western Standard Time
+ A_CST = GMT13 + 1, // Central Standard Time (+9.5)
+ A_EST = GMT10, // Eastern Standard Time
+ A_ESST = GMT11, // Eastern Summer Time
// New Zealand
- NZST = GMT12, // Standard Time
- NZDT = GMT13, // Daylight Saving Time
+ NZST = GMT12, // Standard Time
+ NZDT = GMT13, // Daylight Saving Time
// Universal Coordinated Time = the new and politically correct name
// for GMT
wxDateTime_t minute = 0, wxDateTime_t second = 0,
wxDateTime_t millisec = 0);
+ /**
+ Same as SetFromMSWSysTime.
+
+ @param st
+ Input, Windows SYSTEMTIME reference
+ @since 2.9.0
+ @remarks MSW only
+ */
+ wxDateTime(const struct _SYSTEMTIME& st);
+
+
/**
Reset time to midnight (00:00:00) without changing the date.
*/
*/
long unsigned int GetAsDOS() const;
+ /**
+ Initialize using the Windows SYSTEMTIME structure.
+ @param st
+ Input, Windows SYSTEMTIME reference
+ @since 2.9.0
+ @remarks MSW only
+ */
+ wxDateTime& SetFromMSWSysTime(const struct _SYSTEMTIME& st);
+
+ /**
+ Returns the date and time in the Windows SYSTEMTIME format.
+ @param st
+ Output, pointer to Windows SYSTEMTIME
+ @since 2.9.0
+ @remarks MSW only
+ */
+ void GetAsMSWSysTime(struct _SYSTEMTIME* st) const;
+
/**
Returns the century of this date.
*/
Returns the object having the same date component as this one but time
of 00:00:00.
- @wxsince{2.8.2}
+ @since 2.8.2
@see ResetTime()
*/
be specified. It is thus less flexible then ParseDateTime(), but also
has less chances to misinterpret the user input.
- @returns @NULL if the conversion failed, otherwise return the pointer
+ @return @NULL if the conversion failed, otherwise return the pointer
to the character which stopped the scan.
*/
const char* ParseDate(const wxString& date,
be specified. It is thus less flexible then ParseDateTime(), but also
has less chances to misinterpret the user input.
- @returns @NULL if the conversion failed, otherwise return the pointer
+ @return @NULL if the conversion failed, otherwise return the pointer
to the character which stopped the scan.
*/
const char* ParseDate(const char* date);
be specified. It is thus less flexible then ParseDateTime(), but also
has less chances to misinterpret the user input.
- @returns @NULL if the conversion failed, otherwise return the pointer
+ @return @NULL if the conversion failed, otherwise return the pointer
to the character which stopped the scan.
*/
const wchar_t* ParseDate(const wchar_t* date);
anything that may be accepted and will only reject strings which can
not be parsed in any way at all.
- @returns @NULL if the conversion failed, otherwise return the pointer
+ @return @NULL if the conversion failed, otherwise return the pointer
to the character which stopped the scan.
*/
const char* ParseDateTime(const wxString& datetime,
anything that may be accepted and will only reject strings which can
not be parsed in any way at all.
- @returns @NULL if the conversion failed, otherwise return the pointer
+ @return @NULL if the conversion failed, otherwise return the pointer
to the character which stopped the scan.
*/
const char* ParseDateTime(const char* datetime);
anything that may be accepted and will only reject strings which can
not be parsed in any way at all.
- @returns @NULL if the conversion failed, otherwise return the pointer
+ @return @NULL if the conversion failed, otherwise return the pointer
to the character which stopped the scan.
*/
const wchar_t* ParseDateTime(const wchar_t* datetime);
@a dateDef. If it is not specified, Today() is used as the default
date.
- @returns @NULL if the conversion failed, otherwise return the pointer
+ @return @NULL if the conversion failed, otherwise return the pointer
to the character which stopped the scan.
*/
const char* ParseFormat(const wxString& date,
@a dateDef. If it is not specified, Today() is used as the default
date.
- @returns @NULL if the conversion failed, otherwise return the pointer
+ @return @NULL if the conversion failed, otherwise return the pointer
to the character which stopped the scan.
*/
const char* ParseFormat(const char* date,
@a dateDef. If it is not specified, Today() is used as the default
date.
- @returns @NULL if the conversion failed, otherwise return the pointer
+ @return @NULL if the conversion failed, otherwise return the pointer
to the character which stopped the scan.
*/
const wchar_t* ParseFormat(const wchar_t* date,
the date and time parts must be equal to @a sep for the function to
succeed.
- @returns @true if the entire string was parsed successfully, @false
+ @return @true if the entire string was parsed successfully, @false
otherwise.
*/
bool ParseISOCombined(const wxString& date, char sep = 'T');
/**
This function parses the date in ISO 8601 format @c "YYYY-MM-DD".
- @returns @true if the entire string was parsed successfully, @false
+ @return @true if the entire string was parsed successfully, @false
otherwise.
*/
bool ParseISODate(const wxString& date);
/**
This function parses the time in ISO 8601 format @c "HH:MM:SS".
- @returns @true if the entire string was parsed successfully, @false
+ @return @true if the entire string was parsed successfully, @false
otherwise.
*/
bool ParseISOTime(const wxString& date);
This functions is like ParseDateTime(), but only allows the time to be
specified in the input string.
- @returns @NULL if the conversion failed, otherwise return the pointer
+ @return @NULL if the conversion failed, otherwise return the pointer
to the character which stopped the scan.
*/
const char* ParseTime(const wxString& time,
This functions is like ParseDateTime(), but only allows the time to be
specified in the input string.
- @returns @NULL if the conversion failed, otherwise return the pointer
+ @return @NULL if the conversion failed, otherwise return the pointer
to the character which stopped the scan.
*/
const char* ParseTime(const char* time);
This functions is like ParseDateTime(), but only allows the time to be
specified in the input string.
- @returns @NULL if the conversion failed, otherwise return the pointer
+ @return @NULL if the conversion failed, otherwise return the pointer
to the character which stopped the scan.
*/
const wchar_t* ParseTime(const wchar_t* time);
Sets the date to the last day in the specified month (the current one
by default).
- @returns The reference to the modified object itself.
+ @return The reference to the modified object itself.
*/
wxDateTime SetToLastMonthDay(Month month = Inv_Month,
int year = Inv_Year);
Sets the date so that it will be the first @a weekday following the
current date.
- @returns The reference to the modified object itself.
+ @return The reference to the modified object itself.
*/
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.
+ @return The reference to the modified object itself.
*/
wxDateTime& SetToPrevWeekDay(WeekDay weekday);
SetToWeekDay(-1, wxDateTime::Sun) will set the date to the last Sunday
in the current month.
- @returns @true if the date was modified successfully, @false otherwise
+ @return @true if the date was modified successfully, @false otherwise
meaning that the specified date doesn't exist.
*/
bool SetToWeekDay(WeekDay weekday, int n = 1,
Adjusts the date so that it will still lie in the same week as before,
but its week day will be the given one.
- @returns The reference to the modified object itself.
+ @return The reference to the modified object itself.
*/
wxDateTime SetToWeekDayInSameWeek(WeekDay weekday,
WeekFlags flags = Monday_First);
number should be in the range 1-366 for the leap years and 1-365 for
the other ones.
- @returns The reference to the modified object itself.
+ @return The reference to the modified object itself.
*/
wxDateTime& SetToYearDay(wxDateTime_t yday);
Transform the date from the given time zone to the local one. If
@a noDST is @true, no DST adjustments will be made.
- @returns The date in the local time zone.
+ @return The date in the local time zone.
*/
wxDateTime FromTimezone(const TimeZone& tz, bool noDST = false) const;
Transform the date to the given time zone. If @a noDST is @true, no DST
adjustments will be made.
- @returns The date in the new time zone.
+ @return The date in the new time zone.
*/
wxDateTime ToTimezone(const TimeZone& tz, bool noDST = false) const;
/**
Returns the sum of two date spans.
- @returns A new wxDateSpan object with the result.
+ @return A new wxDateSpan object with the result.
*/
wxDateSpan Add(const wxDateSpan& other) const;
/**
product is computed by multiplying each of the components by the
@a factor.
- @returns A new wxDateSpan object with the result.
+ @return A new wxDateSpan object with the result.
*/
wxDateSpan Multiply(int factor) const;
/**
Multiplies this date span by the specified @a factor. The product is
computed by multiplying each of the components by the @a factor.
- @returns A reference to this wxDateSpan object modified in place.
+ @return A reference to this wxDateSpan object modified in place.
*/
wxDateSpan& Multiply(int factor);
/**
Returns the difference of two date spans.
- @returns A new wxDateSpan object with the result.
+ @return A new wxDateSpan object with the result.
*/
wxDateSpan Subtract(const wxDateSpan& other) const;
/**
Multiplies this date span by the specified @a factor. The product is
computed by multiplying each of the components by the @a factor.
- @returns A reference to this wxDateSpan object modified in place.
+ @return A reference to this wxDateSpan object modified in place.
*/
wxDateSpan& operator*=(int factor);
/**
Returns the sum of two time spans.
- @returns A new wxDateSpan object with the result.
+ @return A new wxDateSpan object with the result.
*/
wxTimeSpan Add(const wxTimeSpan& diff) const;
/**
/**
Returns the product of this time span by @a n.
- @returns A new wxTimeSpan object with the result.
+ @return A new wxTimeSpan object with the result.
*/
wxTimeSpan Multiply(int n) const;
/**
Multiplies this time span by @a n.
- @returns A reference to this wxTimeSpan object modified in place.
+ @return A reference to this wxTimeSpan object modified in place.
*/
wxTimeSpan& Multiply(int n);
/**
Returns the difference of two time spans.
- @returns A new wxDateSpan object with the result.
+ @return A new wxDateSpan object with the result.
*/
wxTimeSpan Subtract(const wxTimeSpan& diff) const;
/**
/**
Multiplies this time span by @a n.
- @returns A reference to this wxTimeSpan object modified in place.
+ @return A reference to this wxTimeSpan object modified in place.
*/
wxTimeSpan& operator*=(int n);