OnixS ICE iMpact Multicast Price Feed Handler C++ library 8.18.0
Users' manual and API documentation
Loading...
Searching...
No Matches
Date Class Reference

#include <Time.h>

Public Member Functions

 Date ()
 Date (unsigned int year, Month month, unsigned int day)
 Date (const Date &other)
unsigned int day () const
bool operator== (const Date &other) const
bool operator!= (const Date &other) const
bool operator< (const Date &other) const
bool operator> (const Date &other) const
Dateoperator+= (TimeSpan &span)
Dateoperator-= (TimeSpan &span)
Dateoperator= (const Date &other)
std::string toString () const
void toString (std::string &) const
Public Member Functions inherited from YearMonth
 YearMonth ()
 YearMonth (unsigned int year, Month month)
 YearMonth (const YearMonth &other)
unsigned int year () const
Month month () const
bool operator== (const YearMonth &) const
bool operator!= (const YearMonth &) const
YearMonthoperator= (const YearMonth &other)
std::string toString () const
void toString (std::string &) const

Static Public Member Functions

static Date deserialize (unsigned long long)
Static Public Member Functions inherited from YearMonth
static YearMonth deserialize (unsigned long long)

Additional Inherited Members

Protected Member Functions inherited from YearMonth
 YearMonth (unsigned int, Month, const NoVerify &)

Detailed Description

Definition at line 319 of file Time.h.

Constructor & Destructor Documentation

◆ Date() [1/3]

Date ( )

Initializes the date to Jan 1, 0001, serving as the default value.

◆ Date() [2/3]

Date ( unsigned int year,
Month month,
unsigned int day )

Explicit initialization.

Exceptions
exceptionif input parameters do not form valid date.

◆ Date() [3/3]

Date ( const Date & other)

Initializes as a copy of the other date.

Member Function Documentation

◆ day()

unsigned int day ( ) const
inline

Returns the day component of the date. The valid range of values is [01, 31].

Definition at line 376 of file Time.h.

◆ deserialize()

Date deserialize ( unsigned long long )
static

De-serializes date from its numeric presentation as it's used by ICE.

◆ operator!=()

bool operator!= ( const Date & other) const

Returns true if the current date is not equal to the specified date.

◆ operator+=()

Date & operator+= ( TimeSpan & span)

Increases the date by the specified time interval and returns the new date.

◆ operator-=()

Date & operator-= ( TimeSpan & span)

Decreases the date by the specified time interval and returns the new date.

◆ operator<()

bool operator< ( const Date & other) const

Returns true if the provided date occurs before the other date.

◆ operator=()

Date & operator= ( const Date & other)

Re-initializes this instance, copying the state from another instance.

◆ operator==()

bool operator== ( const Date & other) const

Compares this object with another for equality.

◆ operator>()

bool operator> ( const Date & other) const

Checks if the given date occurs after the other specified date.

◆ toString() [1/2]

std::string toString ( ) const
inline

Serializes date into YYYYMMDD presentation.

Definition at line 381 of file Time.h.

◆ toString() [2/2]

void toString ( std::string & ) const

Serializes date into YYYYMMDD presentation.