Time Shield Library
C++ library for working with time
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_ISO_WEEK_STRUCT_HPP_INCLUDED
4#define _TIME_SHIELD_ISO_WEEK_STRUCT_HPP_INCLUDED
5
10
11#include <cstdint>
12
13namespace time_shield {
14
18 int64_t year;
19 int32_t week;
20 int32_t weekday;
21 };
22
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_ISO_WEEK_STRUCT_HPP_INCLUDED
constexpr T1 weekday(year_t year, int month, int day)
Alias for day_of_week_date.
TIME_SHIELD_CONSTEXPR T year(ts_t ts=time_shield::ts())
Alias for year_of function.
const IsoWeekDateStruct create_iso_week_date_struct(int64_t year, int32_t week=1, int32_t weekday=1)
Creates an IsoWeekDateStruct instance.
Main namespace for the Time Shield library.
Structure to represent an ISO week date.
int64_t year
ISO week-numbering year component.
int32_t week
ISO week number component (1-52/53).
int32_t weekday
ISO weekday component (1=Monday .. 7=Sunday).