Time Shield Library
C++ library for working with time
Loading...
Searching...
No Matches
types.hpp
Go to the documentation of this file.
1#pragma once
2#ifndef _TIME_SHIELD_TYPES_HPP_INCLUDED
3#define _TIME_SHIELD_TYPES_HPP_INCLUDED
4
11
12#include <cstdint>
13
14namespace time_shield {
15
36
38
39 // --- Calendar & Year Types ---
40 typedef int64_t year_t;
41 typedef int64_t uday_t;
42 using unixday_t = uday_t;
43
44 // --- Unix Timestamp Types ---
45 typedef int64_t ts_t;
46 typedef int64_t ts_ms_t;
47 typedef int64_t ts_us_t;
48 typedef double fts_t;
49
50 // --- Automation and Julian Time ---
51 typedef double oadate_t;
52 typedef double jd_t;
53 typedef double mjd_t;
54 typedef uint64_t jdn_t;
55
56 // --- Time zone offset ---
57 typedef int32_t tz_t;
58
60
61}; // namespace time_shield
62
63#endif // _TIME_SHIELD_TYPES_HPP_INCLUDED
int64_t ts_t
Unix timestamp in seconds since 1970‑01‑01T00:00:00Z.
Definition types.hpp:45
uday_t unixday_t
Alias for Unix day count type.
Definition types.hpp:42
int32_t tz_t
Time zone offset in minutes from UTC (e.g., +180 = UTC+3).
Definition types.hpp:57
int64_t ts_ms_t
Unix timestamp in milliseconds since epoch.
Definition types.hpp:46
int64_t uday_t
Unix day count since 1970‑01‑01 (days since epoch).
Definition types.hpp:41
double fts_t
Floating-point timestamp (fractional seconds since epoch).
Definition types.hpp:48
uint64_t jdn_t
Julian Day Number (whole days since Julian epoch).
Definition types.hpp:54
int64_t ts_us_t
Unix timestamp in microseconds since epoch.
Definition types.hpp:47
double oadate_t
OLE Automation date (days since 1899‑12‑30, as double).
Definition types.hpp:51
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:53
double jd_t
Julian Date (days since -4713‑11‑24T12:00:00Z).
Definition types.hpp:52
Main namespace for the Time Shield library.