Time Shield Library
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_TYPES_HPP_INCLUDED
4#define _TIME_SHIELD_TYPES_HPP_INCLUDED
5
12
13#include <cstdint>
14
15namespace 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_TYPES_HPP_INCLUDED
int64_t ts_t
Unix timestamp in seconds since 1970‑01‑01T00:00:00Z.
Definition types.hpp:49
int64_t dse_t
Unix day count since 1970‑01‑01 (days since epoch).
Definition types.hpp:42
int32_t tz_t
Time zone offset in minutes from UTC (e.g., +180 = UTC+3).
Definition types.hpp:61
int64_t ts_ms_t
Unix timestamp in milliseconds since epoch.
Definition types.hpp:50
dse_t unix_day_t
Alias for Unix day count type.
Definition types.hpp:43
dse_t unixday_t
Alias for Unix day count type.
Definition types.hpp:44
double fts_t
Floating-point timestamp (fractional seconds since epoch).
Definition types.hpp:52
uint64_t jdn_t
Julian Day Number (whole days since Julian epoch).
Definition types.hpp:58
int64_t ts_us_t
Unix timestamp in microseconds since epoch.
Definition types.hpp:51
double oadate_t
OLE Automation date (days since 1899‑12‑30, as double).
Definition types.hpp:55
int64_t year_t
Year as an integer (e.g., 2024).
Definition types.hpp:41
double mjd_t
Modified Julian Date (JD − 2400000.5).
Definition types.hpp:57
int32_t iso_week_t
ISO week number type (1-52/53).
Definition types.hpp:45
int32_t iso_weekday_t
ISO weekday number type (1=Monday .. 7=Sunday).
Definition types.hpp:46
double jd_t
Julian Date (days since -4713‑11‑24T12:00:00Z).
Definition types.hpp:56
Main namespace for the Time Shield library.