SDL_DateTime Struct Reference

`#include <SDL_time.h>`

## Data Fields

int | year
int | month
int | day
int | hour
int | minute
int | second
int | nanosecond
int | day_of_week
int | utc_offset

## Detailed Description

# CategoryTime

SDL realtime clock and date/time routines.

There are two data types that are used in this category: SDL_Time, which represents the nanoseconds since a specific moment (an "epoch"), and SDL_DateTime, which breaks time down into human-understandable components: years, months, days, hours, etc.

Much of the functionality is involved in converting those two types to other useful forms. A structure holding a calendar date and time broken down into its components.

Since
  This struct is available since SDL 3.2.0.

Definition at line 54 of file SDL_time.h.

## Field Documentation

## day

int SDL_DateTime::day

Day of the month [01-31]

Definition at line 58 of file SDL_time.h.

## day_of_week

int SDL_DateTime::day_of_week

Day of the week [0-6] (0 being Sunday)

Definition at line 63 of file SDL_time.h.

## hour

int SDL_DateTime::hour

Hour [0-23]

Definition at line 59 of file SDL_time.h.

## minute

int SDL_DateTime::minute

Minute [0-59]

Definition at line 60 of file SDL_time.h.

## month

int SDL_DateTime::month

Month [01-12]

Definition at line 57 of file SDL_time.h.

## nanosecond

int SDL_DateTime::nanosecond

Nanoseconds [0-999999999]

Definition at line 62 of file SDL_time.h.

## second

int SDL_DateTime::second

Seconds [0-60]

Definition at line 61 of file SDL_time.h.

## utc_offset

int SDL_DateTime::utc_offset

Seconds east of UTC

Definition at line 64 of file SDL_time.h.

## year

int SDL_DateTime::year

Year

Definition at line 56 of file SDL_time.h.

The documentation for this struct was generated from the following file:

- SDL_time.h