Time Shield Library
C++ library for working with time
Toggle main menu visibility
Loading...
Searching...
No Matches
types.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: MIT
2
#pragma once
3
#ifndef TIME_SHIELD_HEADER_TIME_SHIELD_TYPES_HPP_INCLUDED
4
#define TIME_SHIELD_HEADER_TIME_SHIELD_TYPES_HPP_INCLUDED
5
12
13
#include <cstdint>
14
15
namespace
time_shield
{
16
37
39
40
// --- Calendar & Year Types ---
41
typedef
int64_t
year_t
;
42
typedef
int64_t
dse_t
;
43
using
unix_day_t
=
dse_t
;
44
using
unixday_t
=
dse_t
;
45
typedef
int32_t
iso_week_t
;
46
typedef
int32_t
iso_weekday_t
;
47
48
// --- Unix Timestamp Types ---
49
typedef
int64_t
ts_t
;
50
typedef
int64_t
ts_ms_t
;
51
typedef
int64_t
ts_us_t
;
52
typedef
double
fts_t
;
53
54
// --- Automation and Julian Time ---
55
typedef
double
oadate_t
;
56
typedef
double
jd_t
;
57
typedef
double
mjd_t
;
58
typedef
uint64_t
jdn_t
;
59
60
// --- Time zone offset ---
61
typedef
int32_t
tz_t
;
62
64
65
};
// namespace time_shield
66
67
#endif
// TIME_SHIELD_HEADER_TIME_SHIELD_TYPES_HPP_INCLUDED
time_shield::ts_t
int64_t ts_t
Unix timestamp in seconds since 1970‑01‑01T00:00:00Z.
Definition
types.hpp:49
time_shield::dse_t
int64_t dse_t
Unix day count since 1970‑01‑01 (days since epoch).
Definition
types.hpp:42
time_shield::tz_t
int32_t tz_t
Time zone offset in minutes from UTC (e.g., +180 = UTC+3).
Definition
types.hpp:61
time_shield::ts_ms_t
int64_t ts_ms_t
Unix timestamp in milliseconds since epoch.
Definition
types.hpp:50
time_shield::unix_day_t
dse_t unix_day_t
Alias for Unix day count type.
Definition
types.hpp:43
time_shield::unixday_t
dse_t unixday_t
Alias for Unix day count type.
Definition
types.hpp:44
time_shield::fts_t
double fts_t
Floating-point timestamp (fractional seconds since epoch).
Definition
types.hpp:52
time_shield::jdn_t
uint64_t jdn_t
Julian Day Number (whole days since Julian epoch).
Definition
types.hpp:58
time_shield::ts_us_t
int64_t ts_us_t
Unix timestamp in microseconds since epoch.
Definition
types.hpp:51
time_shield::oadate_t
double oadate_t
OLE Automation date (days since 1899‑12‑30, as double).
Definition
types.hpp:55
time_shield::year_t
int64_t year_t
Year as an integer (e.g., 2024).
Definition
types.hpp:41
time_shield::mjd_t
double mjd_t
Modified Julian Date (JD − 2400000.5).
Definition
types.hpp:57
time_shield::iso_week_t
int32_t iso_week_t
ISO week number type (1-52/53).
Definition
types.hpp:45
time_shield::iso_weekday_t
int32_t iso_weekday_t
ISO weekday number type (1=Monday .. 7=Sunday).
Definition
types.hpp:46
time_shield::jd_t
double jd_t
Julian Date (days since -4713‑11‑24T12:00:00Z).
Definition
types.hpp:56
time_shield
Main namespace for the Time Shield library.
include
time_shield
types.hpp
Generated by
1.17.0