Version: 3.2.5
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 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). 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

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