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 uday_t;
43 using unixday_t = uday_t;
44
45 // --- Unix Timestamp Types ---
46 typedef int64_t ts_t;
47 typedef int64_t ts_ms_t;
48 typedef int64_t ts_us_t;
49 typedef double fts_t;
50
51 // --- Automation and Julian Time ---
52 typedef double oadate_t;
53 typedef double jd_t;
54 typedef double mjd_t;
55 typedef uint64_t jdn_t;
56
57 // --- Time zone offset ---
58 typedef int32_t tz_t;
59
61
62}; // namespace time_shield
63
64#endif // _TIME_SHIELD_TYPES_HPP_INCLUDED
int64_t ts_t
Unix timestamp in seconds since 1970‑01‑01T00:00:00Z.
Definition types.hpp:46
uday_t unixday_t
Alias for Unix day count type.
Definition types.hpp:43
int32_t tz_t
Time zone offset in minutes from UTC (e.g., +180 = UTC+3).
Definition types.hpp:58
int64_t ts_ms_t
Unix timestamp in milliseconds since epoch.
Definition types.hpp:47
int64_t uday_t
Unix day count since 1970‑01‑01 (days since epoch).
Definition types.hpp:42
double fts_t
Floating-point timestamp (fractional seconds since epoch).
Definition types.hpp:49
uint64_t jdn_t
Julian Day Number (whole days since Julian epoch).
Definition types.hpp:55
int64_t ts_us_t
Unix timestamp in microseconds since epoch.
Definition types.hpp:48
double oadate_t
OLE Automation date (days since 1899‑12‑30, as double).
Definition types.hpp:52
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:54
double jd_t
Julian Date (days since -4713‑11‑24T12:00:00Z).
Definition types.hpp:53
Main namespace for the Time Shield library.