Time Shield Library
C++ library for working with time
Loading...
Searching...
No Matches
Time Types

Fundamental type definitions for time-related data. More...

Typedefs

typedef int64_t time_shield::year_t
 Year as an integer (e.g., 2024).
 
typedef int64_t time_shield::uday_t
 Unix day count since 1970‑01‑01 (days since epoch).
 
using time_shield::unixday_t = uday_t
 Alias for Unix day count type.
 
typedef int64_t time_shield::ts_t
 Unix timestamp in seconds since 1970‑01‑01T00:00:00Z.
 
typedef int64_t time_shield::ts_ms_t
 Unix timestamp in milliseconds since epoch.
 
typedef int64_t time_shield::ts_us_t
 Unix timestamp in microseconds since epoch.
 
typedef double time_shield::fts_t
 Floating-point timestamp (fractional seconds since epoch).
 
typedef double time_shield::oadate_t
 OLE Automation date (days since 1899‑12‑30, as double).
 
typedef double time_shield::jd_t
 Julian Date (days since -4713‑11‑24T12:00:00Z).
 
typedef double time_shield::mjd_t
 Modified Julian Date (JD − 2400000.5).
 
typedef uint64_t time_shield::jdn_t
 Julian Day Number (whole days since Julian epoch).
 
typedef int32_t time_shield::tz_t
 Time zone offset in minutes from UTC (e.g., +180 = UTC+3).
 

Detailed Description

Fundamental type definitions for time-related data.

This group defines the core time representations used throughout the library, including timestamps, fractional time units, Julian dates, and time zone offsets.

Type Categories

Example Usage

time_shield::ts_t now = 1700000000; // Unix timestamp in seconds
time_shield::fts_t precise = 1700000000.123; // Time with fractional seconds
time_shield::jd_t julian = 2459580.5; // Julian Date
time_shield::tz_t offset = 180; // UTC+3 in minutes
int64_t ts_t
Unix timestamp in seconds since 1970‑01‑01T00:00:00Z.
Definition types.hpp:45
int32_t tz_t
Time zone offset in minutes from UTC (e.g., +180 = UTC+3).
Definition types.hpp:57
double fts_t
Floating-point timestamp (fractional seconds since epoch).
Definition types.hpp:48
double jd_t
Julian Date (days since -4713‑11‑24T12:00:00Z).
Definition types.hpp:52
const ts_ms_t now() noexcept
Get the current UTC timestamp in milliseconds.

Typedef Documentation

◆ fts_t

typedef double time_shield::fts_t

Floating-point timestamp (fractional seconds since epoch).

Definition at line 48 of file types.hpp.

◆ jd_t

typedef double time_shield::jd_t

Julian Date (days since -4713‑11‑24T12:00:00Z).

Definition at line 52 of file types.hpp.

◆ jdn_t

typedef uint64_t time_shield::jdn_t

Julian Day Number (whole days since Julian epoch).

Definition at line 54 of file types.hpp.

◆ mjd_t

typedef double time_shield::mjd_t

Modified Julian Date (JD − 2400000.5).

Definition at line 53 of file types.hpp.

◆ oadate_t

typedef double time_shield::oadate_t

OLE Automation date (days since 1899‑12‑30, as double).

Definition at line 51 of file types.hpp.

◆ ts_ms_t

typedef int64_t time_shield::ts_ms_t

Unix timestamp in milliseconds since epoch.

Definition at line 46 of file types.hpp.

◆ ts_t

typedef int64_t time_shield::ts_t

Unix timestamp in seconds since 1970‑01‑01T00:00:00Z.

Definition at line 45 of file types.hpp.

◆ ts_us_t

typedef int64_t time_shield::ts_us_t

Unix timestamp in microseconds since epoch.

Definition at line 47 of file types.hpp.

◆ tz_t

typedef int32_t time_shield::tz_t

Time zone offset in minutes from UTC (e.g., +180 = UTC+3).

Definition at line 57 of file types.hpp.

◆ uday_t

typedef int64_t time_shield::uday_t

Unix day count since 1970‑01‑01 (days since epoch).

Definition at line 41 of file types.hpp.

◆ unixday_t

Alias for Unix day count type.

Definition at line 42 of file types.hpp.

◆ year_t

typedef int64_t time_shield::year_t

Year as an integer (e.g., 2024).

Definition at line 40 of file types.hpp.