wxWidgets: wxDateTime::Tm Struct Reference

| Version: 3.1.5

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
wxDateTime::Tm Struct Reference

`#include </cygdrive/c/Users/Hamis/Cygwin-packaging/wxWidgets3.1/wxWidgets3.1-3.1.5-4.x86_64/src/wxWidgets-3.1.5/interface/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 yday fields count from 0 while mday 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

## ◆ GetWeekDay()

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.

## ◆ IsValid()

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

## ◆ hour

wxDateTime_t wxDateTime::Tm::hour

Hours since midnight in 0..23 range.

## ◆ mday

wxDateTime_t wxDateTime::Tm::mday

Day of the month in 1..31 range.

## ◆ min

wxDateTime_t wxDateTime::Tm::min

Minutes in 0..59 range.

## ◆ mon

Month wxDateTime::Tm::mon

Month, as an enumerated constant.

## ◆ msec

wxDateTime_t wxDateTime::Tm::msec

Number of milliseconds.

## ◆ sec

wxDateTime_t wxDateTime::Tm::sec

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

## ◆ yday

wxDateTime_t wxDateTime::Tm::yday

Day of the year in 0..365 range.

## ◆ year

int wxDateTime::Tm::year

Year.