Time Shield Library
C++ library for working with time
Loading...
Searching...
No Matches
date_struct.hpp
Go to the documentation of this file.
1#pragma once
6#ifndef _TIME_SHIELD_DATE_STRUCT_HPP_INCLUDED
7#define _TIME_SHIELD_DATE_STRUCT_HPP_INCLUDED
8
9namespace time_shield {
10
13 struct DateStruct {
14 int64_t year;
15 int32_t mon;
16 int32_t day;
17 };
18
26 int64_t year,
27 int32_t mon = 1,
28 int32_t day = 1) {
29 DateStruct data{year, mon, day};
30 return data;
31 }
32
33}; // namespace time_shield
34
35#endif // _TIME_SHIELD_DATE_STRUCT_HPP_INCLUDED
TIME_SHIELD_CONSTEXPR const T year(ts_t ts=ts())
Alias for get_year function.
const DateStruct create_date_struct(int64_t year, int32_t mon=1, int32_t day=1)
Creates a DateStruct instance.
Main namespace for the Time Shield library.
Definition constants.hpp:12
Structure to represent a date.
int32_t mon
Month component of the date (1-12).
int32_t day
Day component of the date (1-31).
int64_t year
Year component of the date.