#include <OnixS/CME/DropCopy/Time.h>
Public Member Functions | |
YearMonth () | |
YearMonth (UInt32 year, Month month) | |
YearMonth (UInt32 year, Month month, UInt32 day) | |
YearMonth (UInt32 year, Month month, WeekCode week) | |
YearMonth (const YearMonth &other) | |
UInt32 | year () const |
Month | month () const |
UInt32 | day () const |
WeekCode | week () const |
bool | hasDay () const |
bool | hasWeek () const |
bool | operator== (const YearMonth &) const |
bool | operator!= (const YearMonth &) const |
bool | operator< (const YearMonth &other) const |
bool | operator> (const YearMonth &other) const |
YearMonth & | operator= (const YearMonth &other) |
std::string | toString () const |
void | toString (std::string &) const |
Static Public Member Functions | |
static YearMonth | deserialize (const StringRef &) |
Represents month-year pair. Year must fit into [0001, 9999] range. Month must fit into [01, 12] range.
YearMonth | ( | ) |
Initializes instance as Jan, 0001.
Initializes instance with given values according YYYYMM (year/month) format. Input parameters are checked for validness.
exception | if input parameters do not fit into a valid range. |
Initializes instance with given values according YYYYMMDD (year/month/day) format. Input parameters are checked for validness.
exception | if input parameters do not fit into a valid range. |
Initializes instance with given values according YYYYMMWW (year/month/week) format. Input parameters are checked for validness.
exception | if input parameters do not fit into a valid range. |
|
inline |
De-serializes instance from its string presentation (YYYYMM/YYYYMMDD/YYYYMMWW) as it's used by CME Globex.
|
inline |
|
inline |
|
inline |
bool operator!= | ( | const YearMonth & | ) | const |
Compares with other instance for inequality.
bool operator< | ( | const YearMonth & | other | ) | const |
Checks whether this instance is less than other one. Note: when comparing objects with different date components, e.g. days vs weeks (but same year and month) following order is applied: YYYYMM < YYYYMMWW < YYYYMMDD
bool operator== | ( | const YearMonth & | ) | const |
Compares with other instance for equality.
bool operator> | ( | const YearMonth & | other | ) | const |
Checks whether this instance is greater than other one. Note: when comparing objects with different date components, e.g. days vs weeks (but same year and month) following order is applied: YYYYMMDD > YYYYMMWW > YYYYMM
|
inline |
void toString | ( | std::string & | ) | const |
Serializes into text (YYYYMM/YYYYMMDD/YYYYMMWW) presentation.
|
inline |
|
inline |