#include <Time.h>
Public Member Functions | |
| Timestamp () | |
| Timestamp (unsigned year, Month month, unsigned day) | |
| Timestamp (unsigned year, Month month, unsigned day, unsigned hour, unsigned minute, unsigned second, unsigned nanosecond) | |
| Timestamp (const Timestamp &other) | |
| Timestamp (const TimeSpan &) | |
| unsigned int | year () const |
| Month | month () const |
| unsigned int | day () const |
| unsigned int | hour () const |
| unsigned int | minute () const |
| unsigned int | second () const |
| unsigned int | millisecond () const |
| unsigned int | microsecond () const |
| unsigned int | nanosecond () const |
| Timestamp | date () const |
| void | date (Date &) const |
| TimeSpan | time () const |
| DayOfWeek | dayOfWeek () const |
| bool | operator== (const Timestamp &other) const |
| bool | operator!= (const Timestamp &other) const |
| bool | operator< (const Timestamp &other) const |
| bool | operator> (const Timestamp &other) const |
| Timestamp & | operator+= (const TimeSpan &span) |
| Timestamp & | operator-= (const TimeSpan &span) |
| Timestamp & | operator= (const Timestamp &other) |
| std::string | toString (TimestampFormat format=TimestampFormats::YYYYMMDDHHMMSSnsec) const |
| void | toString (std::string &str, TimestampFormat format=TimestampFormats::YYYYMMDDHHMMSSnsec) const |
Static Public Member Functions | |
| static Timestamp | now () |
| static Timestamp | utcNow () |
| static Timestamp | deserialize (const std::string &) |
| static Timestamp | deserialize (unsigned long long presentation, TimestampFormat format) |
Friends | |
| ONIXS_ICEMDH_EXPORT TimeSpan | operator- (const Timestamp &left, const Timestamp &right) |
| Timestamp | ( | ) |
Initializes as Jan 1, 0001, 00:00:00.
Initializes as date with zero time component.
Input parameters are validated, therefore constructor throws exception if input values do not fit into their valid ranges.
| Timestamp | ( | unsigned | year, |
| Month | month, | ||
| unsigned | day, | ||
| unsigned | hour, | ||
| unsigned | minute, | ||
| unsigned | second, | ||
| unsigned | nanosecond ) |
Explicit timestamp initialization.
Input parameters are validated, therefore constructor throws exception if input values do not fit into their valid ranges.
| Timestamp date | ( | ) | const |
Returns timestamp without time part.
| void date | ( | Date & | ) | const |
Returns date component of timestamp.
| unsigned int day | ( | ) | const |
Day component of timestamp.
| DayOfWeek dayOfWeek | ( | ) | const |
Returns day of the week.
|
static |
De-serializes timestamp from text presentation.
|
static |
De-serializes timestamp from its numeric presentation as it's used by the ICE.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
Return timestamp that is current date and time expressed as local time.
| bool operator!= | ( | const Timestamp & | other | ) | const |
Compares with other instance for inequality.
| bool operator< | ( | const Timestamp & | other | ) | const |
Checks whether timestamp is less than other one.
| bool operator== | ( | const Timestamp & | other | ) | const |
Compares with other instance for equality.
| bool operator> | ( | const Timestamp & | other | ) | const |
Checks whether timestamp is greater than other one.
|
inline |
| TimeSpan time | ( | ) | const |
Return time part of timestamp.
| void toString | ( | std::string & | str, |
| TimestampFormat | format = TimestampFormats::YYYYMMDDHHMMSSnsec ) const |
Returns text presentation of timestamp using specified presentation format.
|
inline |
|
static |
Return timestamp that is current date and time expressed as UTC time.
| unsigned int year | ( | ) | const |
Year component of timestamp.