Time Shield Library
C++ library for working with time
Toggle main menu visibility
Loading...
Searching...
No Matches
iso_week_struct.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: MIT
2
#pragma once
3
#ifndef TIME_SHIELD_HEADER_TIME_SHIELD_ISO_WEEK_STRUCT_HPP_INCLUDED
4
#define TIME_SHIELD_HEADER_TIME_SHIELD_ISO_WEEK_STRUCT_HPP_INCLUDED
5
10
11
#include <cstdint>
12
13
namespace
time_shield
{
14
17
struct
IsoWeekDateStruct
{
18
int64_t
year
;
19
int32_t
week
;
20
int32_t
weekday
;
21
};
22
29
inline
const
IsoWeekDateStruct
create_iso_week_date_struct
(
30
int64_t
year
,
31
int32_t week = 1,
32
int32_t
weekday
= 1) {
33
IsoWeekDateStruct
data{
year
, week,
weekday
};
34
return
data;
35
}
36
37
};
// namespace time_shield
38
39
#endif
// TIME_SHIELD_HEADER_TIME_SHIELD_ISO_WEEK_STRUCT_HPP_INCLUDED
time_shield::weekday
TIME_SHIELD_CONSTEXPR T1 weekday(year_t year, int month, int day)
Alias for day_of_week_date.
Definition
time_conversion_aliases.hpp:1867
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_iso_week_date_struct
const IsoWeekDateStruct create_iso_week_date_struct(int64_t year, int32_t week=1, int32_t weekday=1)
Creates an IsoWeekDateStruct instance.
Definition
iso_week_struct.hpp:29
time_shield
Main namespace for the Time Shield library.
time_shield::IsoWeekDateStruct
Structure to represent an ISO week date.
Definition
iso_week_struct.hpp:17
time_shield::IsoWeekDateStruct::year
int64_t year
ISO week-numbering year component.
Definition
iso_week_struct.hpp:18
time_shield::IsoWeekDateStruct::week
int32_t week
ISO week number component (1-52/53).
Definition
iso_week_struct.hpp:19
time_shield::IsoWeekDateStruct::weekday
int32_t weekday
ISO weekday component (1=Monday .. 7=Sunday).
Definition
iso_week_struct.hpp:20
include
time_shield
iso_week_struct.hpp
Generated by
1.17.0