Time Shield Library
C++ library for working with time
Toggle main menu visibility
Loading...
Searching...
No Matches
date_struct.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: MIT
2
#pragma once
3
#ifndef TIME_SHIELD_HEADER_TIME_SHIELD_DATE_STRUCT_HPP_INCLUDED
4
#define TIME_SHIELD_HEADER_TIME_SHIELD_DATE_STRUCT_HPP_INCLUDED
5
10
11
namespace
time_shield
{
12
15
struct
DateStruct
{
16
int64_t
year
;
17
int32_t
mon
;
18
int32_t
day
;
19
};
20
27
inline
const
DateStruct
create_date_struct
(
28
int64_t
year
,
29
int32_t mon = 1,
30
int32_t day = 1) {
31
DateStruct
data{
year
, mon, day};
32
return
data;
33
}
34
35
};
// namespace time_shield
36
37
#endif
// TIME_SHIELD_HEADER_TIME_SHIELD_DATE_STRUCT_HPP_INCLUDED
time_shield::year
TIME_SHIELD_CONSTEXPR T year(ts_t ts=time_shield::ts())
Alias for year_of function.
Definition
time_conversion_aliases.hpp:1591
time_shield::create_date_struct
const DateStruct create_date_struct(int64_t year, int32_t mon=1, int32_t day=1)
Creates a DateStruct instance.
Definition
date_struct.hpp:27
time_shield
Main namespace for the Time Shield library.
time_shield::DateStruct
Structure to represent a date.
Definition
date_struct.hpp:15
time_shield::DateStruct::mon
int32_t mon
Month component of the date (1-12).
Definition
date_struct.hpp:17
time_shield::DateStruct::day
int32_t day
Day component of the date (1-31).
Definition
date_struct.hpp:18
time_shield::DateStruct::year
int64_t year
Year component of the date.
Definition
date_struct.hpp:16
include
time_shield
date_struct.hpp
Generated by
1.17.0