22#include "OnixS/CME/DropCopy/Export.h"
567 friend ONIXS_CME_DROP_COPY_EXPORT
TimeSpan
Provides efficient way of accessing text-based FIX field values.
TimeSpan()
Initializes zero span.
TimeSpan(Int32 hours, Int32 minutes, Int32 seconds, Int32 nanoseconds=0)
TimeSpan & operator=(const TimeSpan &other)
Re-assigns time interval from other one.
Int32 milliseconds() const
Int64 totalSeconds() const
Whole number of seconds in time interval.
static TimeSpan deserialize(const std::string &str)
De-serializes time interval from its text presentation.
TimeSpan(const TimeSpan &other)
Initializes as clone of other instance.
bool operator<(const TimeSpan &other) const
Checks whether time interval less than other one.
TimeSpan & operator+=(const TimeSpan &other)
Adds time interval to current one.
Int32 microseconds() const
bool operator==(const TimeSpan &other) const
Compares with other instance for equality.
Int32 nanoseconds() const
static const TimeSpan Zero
Time interval of zero length.
Int64 totalSubseconds(Subsecond subsecondType) const
Whole number of subseconds in time interval.
void toString(std::string &str, TimeSpanFormat format=TimeSpanFormats::SDHHMMSSnsec) const
TimeSpan(Int32 days, Int32 hours, Int32 minutes, Int32 seconds, Int32 nanoseconds)
TimeSpan(Int64 totalSeconds, Int32 nanoseconds)
bool operator!=(const TimeSpan &other) const
Compares with other instance for in-equality.
TimeSpan & operator-=(const TimeSpan &other)
Subtracts time interval from current one.
bool operator>(const TimeSpan &other) const
Checks whether time interval greater than other one.
Represents timestamp without time-zone information.
Timestamp(UInt32 year, Month month, UInt32 day, UInt32 hour, UInt32 minute, UInt32 second, UInt32 nanosecond)
UInt32 minute() const
Minute component of timestamp.
UInt64 toUnixTimestamp(SinceEpochUnit unit) const
Month month() const
Month component of timestamp.
UInt32 day() const
Day component of timestamp.
UInt32 second() const
Second component of timestamp.
Timestamp(const Timestamp &other)
Initializes as copy of other instance.
static Timestamp deserialize(const StringRef &)
De-serializes timestamp from text presentation.
Timestamp()
Initializes as Jan 1, 1970, 00:00:00.
static void utcNow(Timestamp &)
static Timestamp maxTimestamp()
Returns the maximal possible timestamp (year 2554)
static void now(Timestamp &)
static Timestamp fromUnixTimestamp(UInt64 sinceEpoch, SinceEpochUnit unit)
UInt32 hour() const
Hour component of timestamp.
UInt32 millisecond() const
Millisecond component of timestamp.
bool operator<(const Timestamp &other) const
Checks whether timestamp is less than other one.
friend TimeSpan operator-(const Timestamp &left, const Timestamp &right)
Calculates time interval between two timestamps.
UInt32 nanosecond() const
Nanosecond component of timestamp.
DayOfWeek dayOfWeek() const
Returns day of the week.
Timestamp date() const
Returns timestamp without time part.
UInt32 microsecond() const
Microsecond component of timestamp.
bool operator==(const Timestamp &other) const
Compares with other instance for equality.
static Timestamp utcNow()
TimeSpan time() const
Return time part of timestamp.
Timestamp & operator-=(const TimeSpan &span)
Subtracts time interval from given timestamp.
std::string toString(TimestampFormat format=TimestampFormats::YYYYMMDDHHMMSSnsec) const
void toString(std::string &str, TimestampFormat format=TimestampFormats::YYYYMMDDHHMMSSnsec) const
Timestamp & operator=(const Timestamp &other)
Re-initializes as copy of other timestamp.
bool operator!=(const Timestamp &other) const
Compares with other instance for inequality.
Timestamp & operator+=(const TimeSpan &span)
Adds time interval to given timestamp.
bool operator>(const Timestamp &other) const
Checks whether timestamp is greater than other one.
UInt32 year() const
Year component of timestamp.
Timestamp(UInt32 year, Month month, UInt32 day)
bool operator!=(const YearMonth &) const
Compares with other instance for inequality.
std::string toString() const
Serializes into text (YYYYMM/YYYYMMDD/YYYYMMWW) presentation.
YearMonth & operator=(const YearMonth &other)
YearMonth(UInt32 year, Month month)
YearMonth(UInt32 year, Month month, WeekCode week)
static YearMonth deserialize(const StringRef &)
bool operator==(const YearMonth &) const
Compares with other instance for equality.
YearMonth(UInt32 year, Month month, UInt32 day)
void toString(std::string &) const
Serializes into text (YYYYMM/YYYYMMDD/YYYYMMWW) presentation.
YearMonth()
Initializes instance as Jan, 0001.
YearMonth(const YearMonth &other)
Initializes as copy of other instance.
bool operator<(const YearMonth &other) const
bool operator>(const YearMonth &other) const
Months::Enum Month
Identifies months in year.
SinceEpochUnits::Enum SinceEpochUnit
Since epoch units format.
TimeSpan operator-(const Timestamp &left, const Timestamp &right)
Calculates time interval between two timestamps.
TimestampFormats::Enum TimestampFormat
Timestamp format.
Subseconds::Enum Subsecond
Time span format.
DaysOfWeek::Enum DayOfWeek
Identifies days in week.
unsigned long long UInt64
TimeSpanFormats::Enum TimeSpanFormat
Time span format.
WeekCodes::Enum WeekCode
Identifies week number within month.
Identifies day within week.
static Enum deserialize(const char *)
Deserializes value from text presentation.
static const char * toString(Enum)
Returns text presentation for given value.
Identifies months in year.
static Enum deserialize(const char *)
Deserializes value from text presentation.
static const char * toString(Enum)
Returns text presentation for given value.
Since epoch time units supported.
Subseconds formats supported.
Identifies week number within month.
static Enum deserialize(const char *)
Deserializes value from text presentation.
static const char * toString(Enum)
Returns text presentation for given value.