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