wxWidgets: wxDateTime::Tm Struct Reference

| Version: 3.0.4

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

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

All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Public Attributes | List of all members
wxDateTime::Tm Struct Reference

`#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). More...
WeekDay | GetWeekDay ()
| Return the week day corresponding to this date. More...

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

## 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.