OnixS C++ B3 Binary UMDF Market Data Handler 1.11.1
Users' manual and API documentation
Loading...
Searching...
No Matches
Date Class Reference

#include <OnixS/B3/MarketData/UMDF/Time.h>

Public Types

typedef Int32 Days
typedef Int32 Year
typedef OnixS::B3::MarketData::UMDF::Month::Enum Month
typedef UInt32 Day

Public Member Functions

constexpr Date () noexcept
constexpr Date (Days days) noexcept
 Date (Year year, Month month, Day day)
Year year () const
Month month () const
Day day () const
constexpr Days daysSinceEpoch () const noexcept

Detailed Description

Stores the number of days since the Epoch (01-01-1970), so it covers dates a Timestamp cannot represent (e.g. 9999-12-31).

Note
There is no conversion to integral types. To get a Timestamp, use Timestamp(date.year(), date.month(), date.day()), which throws std::out_of_range after 2262-04-11.

Definition at line 919 of file Time.h.

Member Typedef Documentation

◆ Day

typedef UInt32 Day

Integral type presenting day component.

Definition at line 934 of file Time.h.

◆ Days

typedef Int32 Days

Integral type presenting number of days since the Epoch.

Definition at line 923 of file Time.h.

◆ Month

Type presenting month component.

Definition at line 931 of file Time.h.

◆ Year

typedef Int32 Year

Integral type presenting year component.

Definition at line 926 of file Time.h.

Constructor & Destructor Documentation

◆ Date() [1/3]

Date ( )
inlineconstexprnoexcept

Initializes as the Epoch (01-01-1970).

Definition at line 938 of file Time.h.

◆ Date() [2/3]

Date ( Days days)
inlineexplicitconstexprnoexcept

Initializes from number of days since the Epoch.

Definition at line 946 of file Time.h.

◆ Date() [3/3]

Date ( Year year,
Month month,
Day day )
inline

Explicit date initialization.

Input parameters are validated, therefore constructor throws exception if input values do not fit into their valid ranges.

Definition at line 957 of file Time.h.

Member Function Documentation

◆ day()

Day day ( ) const
inline

Day component of given date.

Definition at line 986 of file Time.h.

◆ daysSinceEpoch()

Days daysSinceEpoch ( ) const
inlineconstexprnoexcept

Number of days since the Epoch (01-01-1970).

Definition at line 997 of file Time.h.

◆ month()

Month month ( ) const
inline

Month component of given date.

Definition at line 976 of file Time.h.

◆ year()

Year year ( ) const
inline

Year component of given date.

Definition at line 966 of file Time.h.