Time Shield Library
C++ library for working with time
Loading...
Searching...
No Matches
Time Structures

Structures for representing and working with time and date components. More...

Topics

 Time structure conversions
 
 Time structure formatting
 

Classes

struct  time_shield::TimeZoneStruct
 Structure to represent time zone information. More...
 

Detailed Description

Structures for representing and working with time and date components.

This group includes various structures used for representing time, date, and date-time combinations, along with related utility functions for creating and manipulating these structures.

Included Structures:

Example Usage:

auto time = time_shield::create_time_struct(12, 30, 45); // 12:30:45
auto date = time_shield::create_date_struct(2024, 11, 25); // 2024-11-25
auto date_time = time_shield::create_date_time_struct(2024, 11, 25, 12, 30, 45);
auto tz = time_shield::to_time_zone_struct(3600); // +01:00
const TimeZoneStruct to_time_zone_struct(tz_t offset)
Converts an integer to a TimeZoneStruct.
const DateStruct create_date_struct(int64_t year, int32_t mon=1, int32_t day=1)
Creates a DateStruct instance.
const TimeStruct create_time_struct(int16_t hour, int16_t min, int16_t sec=0, int16_t ms=0)
Creates a TimeStruct instance.
const DateTimeStruct create_date_time_struct(int64_t year, int mon=1, int day=1, int hour=0, int min=0, int sec=0, int ms=0)
Creates a DateTimeStruct instance.