| Version: 3.0.1

- Main Page
- Related Pages
- Categories
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | List of all members
wxDateTime::Tm Struct Reference
Data Structures

`#include <wx/datetime.h>`

## Detailed Description

Contains broken down date-time representation.

This struct is analogous to standard C `struct tm` and uses the same, not always immediately obvious, conventions for its members: notably its mon and mday fields count from 0 while yday counts from 1.

## Public Member Functions

bool | IsValid () const
| Check if the given date/time is valid (in Gregorian calendar).
WeekDay | GetWeekDay ()
| Return the week day corresponding to this date.

## Public Attributes

wxDateTime_t | msec
| Number of milliseconds.
wxDateTime_t | sec
| Seconds in 0..59 (60 with leap seconds) range.
wxDateTime_t | min
| Minutes in 0..59 range.
wxDateTime_t | hour
| Hours since midnight in 0..23 range.
wxDateTime_t | mday
| Day of the month in 1..31 range.
wxDateTime_t | yday
| Day of the year in 0..365 range.
Month | mon
| Month, as an enumerated constant.
int | year
| Year.

## Member Function Documentation

WeekDay wxDateTime::Tm::GetWeekDay | ( |  | ) |

Return the week day corresponding to this date.

Unlike the other fields, the week day is not always available and so must be accessed using this method as it is computed on demand when it is called.

bool wxDateTime::Tm::IsValid | ( |  | ) | const

Check if the given date/time is valid (in Gregorian calendar).

Return false if the components don't correspond to a correct date.

## Member Data Documentation

wxDateTime_t wxDateTime::Tm::hour

Hours since midnight in 0..23 range.

wxDateTime_t wxDateTime::Tm::mday

Day of the month in 1..31 range.

wxDateTime_t wxDateTime::Tm::min

Minutes in 0..59 range.

Month wxDateTime::Tm::mon

Month, as an enumerated constant.

wxDateTime_t wxDateTime::Tm::msec

Number of milliseconds.

wxDateTime_t wxDateTime::Tm::sec

Seconds in 0..59 (60 with leap seconds) range.

wxDateTime_t wxDateTime::Tm::yday

Day of the year in 0..365 range.

int wxDateTime::Tm::year

Year.