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
12 struct DateStruct {
13 int64_t year;
14 int mon;
15 int day;
16 };
17
24 const int64_t& year,
25 const int& mon = 1,
26 const int& day = 1) {
27 DateStruct data{year, mon, day};
28 return data;
29 }
30
31}; // namespace time_shield
32
33#endif // _TIME_SHIELD_DATE_STRUCT_HPP_INCLUDED
Main namespace for the Time Shield library.
Definition constants.hpp:12
TIME_SHIELD_CONSTEXPR const T year(const ts_t &ts=ts())
Alias for get_year function.
const DateStruct create_date_struct(const int64_t &year, const int &mon=1, const int &day=1)
Creates a DateStruct instance.
Structure to represent a date.
int64_t year
Year component of the date.
int day
Day component of the date (1-31).
int mon
Month component of the date (1-12).