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

Type definitions for time-related units and formats. More...

Typedefs

typedef int64_t time_shield::year_t
 Type for representing years as integers.
 
typedef int64_t time_shield::uday_t
 Type for representing Unix days as integers (days since January 1, 1970).
 
typedef int64_t time_shield::ts_t
 Type for representing timestamps in seconds.
 
typedef int64_t time_shield::ts_ms_t
 Type for representing timestamps in milliseconds.
 
typedef int64_t time_shield::ts_us_t
 Type for representing timestamps in microseconds.
 
typedef double time_shield::fts_t
 Type for representing timestamps as floating-point numbers (e.g., fractional seconds).
 
typedef double time_shield::oadate_t
 Type for representing Automation Date (OADate) values as floating-point numbers.
 
typedef double time_shield::jd_t
 Type for representing Julian Dates as floating-point numbers.
 
typedef double time_shield::mjd_t
 Type for representing Modified Julian Dates as floating-point numbers.
 
typedef uint64_t time_shield::jdn_t
 Type for representing Julian Day Numbers as unsigned integers.
 
typedef int time_shield::tz_t
 Type for representing time zone offsets in minutes.
 
using time_shield::unixday_t = uday_t
 Alias for Unix day type (uday_t).
 

Detailed Description

Type definitions for time-related units and formats.

This group includes type definitions for years, timestamps (seconds, milliseconds, microseconds), and other time-related units such as Julian dates and time zone offsets.

Key Features:

Example Usage:

time_shield::ts_t timestamp = 1234567890; // Represent a Unix timestamp in seconds.
time_shield::year_t year = 2024; // Represent a year.
TIME_SHIELD_CONSTEXPR const T year(ts_t ts=ts())
Alias for get_year function.
int64_t ts_t
Type for representing timestamps in seconds.
Definition types.hpp:33
int64_t year_t
Type for representing years as integers.
Definition types.hpp:31
const ts_t timestamp() noexcept
Get the current UTC timestamp in seconds.

Typedef Documentation

◆ fts_t

typedef double time_shield::fts_t

Type for representing timestamps as floating-point numbers (e.g., fractional seconds).

Definition at line 36 of file types.hpp.

◆ jd_t

typedef double time_shield::jd_t

Type for representing Julian Dates as floating-point numbers.

Definition at line 38 of file types.hpp.

◆ jdn_t

typedef uint64_t time_shield::jdn_t

Type for representing Julian Day Numbers as unsigned integers.

Definition at line 40 of file types.hpp.

◆ mjd_t

typedef double time_shield::mjd_t

Type for representing Modified Julian Dates as floating-point numbers.

Definition at line 39 of file types.hpp.

◆ oadate_t

typedef double time_shield::oadate_t

Type for representing Automation Date (OADate) values as floating-point numbers.

Definition at line 37 of file types.hpp.

◆ ts_ms_t

typedef int64_t time_shield::ts_ms_t

Type for representing timestamps in milliseconds.

Definition at line 34 of file types.hpp.

◆ ts_t

typedef int64_t time_shield::ts_t

Type for representing timestamps in seconds.

Definition at line 33 of file types.hpp.

◆ ts_us_t

typedef int64_t time_shield::ts_us_t

Type for representing timestamps in microseconds.

Definition at line 35 of file types.hpp.

◆ tz_t

typedef int time_shield::tz_t

Type for representing time zone offsets in minutes.

Definition at line 41 of file types.hpp.

◆ uday_t

typedef int64_t time_shield::uday_t

Type for representing Unix days as integers (days since January 1, 1970).

Definition at line 32 of file types.hpp.

◆ unixday_t

Alias for Unix day type (uday_t).

Definition at line 43 of file types.hpp.

◆ year_t

typedef int64_t time_shield::year_t

Type for representing years as integers.

Definition at line 31 of file types.hpp.