256 unsigned int year()
const;
336 unsigned int day()
const;
461 unsigned int hour()
const;
464 unsigned int minute()
const;
467 unsigned int second()
const;
543 return static_cast<unsigned int>(sinceEpoch_.hours());
548 return static_cast<unsigned int>(sinceEpoch_.minutes());
553 return static_cast<unsigned int>(sinceEpoch_.seconds());
558 return static_cast<unsigned int>(sinceEpoch_.milliseconds());
563 return static_cast<unsigned int>(sinceEpoch_.microseconds());
568 return static_cast<unsigned int>(sinceEpoch_.nanoseconds());
Represents date without time component.
std::string toString() const
Serializes date into YYYYMMDD presentation.
Date(unsigned int year, Month month, unsigned int day)
bool operator>(const Date &other) const
Checks whether given date is greater than other one.
Date & operator+=(TimeSpan &span)
Adds time interval to the date.
Date(const Date &other)
Initializes as copy of other date.
void toString(std::string &) const
Serializes date into YYYYMMDD presentation.
Date & operator=(const Date &other)
Re-initializes instance as copy of other one.
Date & operator-=(TimeSpan &span)
Subtracts time interval from the date.
bool operator<(const Date &other) const
Checks whether given date is less than other one.
bool operator!=(const Date &other) const
Compares with other for inequality.
bool operator==(const Date &other) const
Compares with other for equality.
static Date deserialize(unsigned long long)
Date()
Initializes as Jan 1, 0001.
TimeSpan(int days, int hours, int minutes, int seconds, int nanoseconds)
static TimeSpan deserialize(unsigned long long presentation, TimeSpanFormat format)
De-serializes time-span from presentation as it's used by the ICE.
TimeSpan()
Initializes zero span.
TimeSpan & operator=(const TimeSpan &other)
Re-assigns time interval from other one.
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.
long long totalSeconds() const
Whole number of seconds in time interval.
TimeSpan(long long totalSeconds, int nanoseconds)
TimeSpan & operator+=(const TimeSpan &other)
Adds time interval to current one.
bool operator==(const TimeSpan &other) const
Compares with other instance for equality.
static const TimeSpan Zero
Time interval of zero length.
void toString(std::string &str, TimeSpanFormat format=TimeSpanFormats::SDHHMMSSnsec) const
bool operator!=(const TimeSpan &other) const
Compares with other instance for in-equality.
TimeSpan & operator-=(const TimeSpan &other)
Subtracts time interval from current one.
TimeSpan(int hours, int minutes, int seconds, int nanoseconds=0)
bool operator>(const TimeSpan &other) const
Checks whether time interval greater than other one.
Represents timestamp without time-zone information.
Timestamp(unsigned year, Month month, unsigned day, unsigned hour, unsigned minute, unsigned second, unsigned nanosecond)
static Timestamp deserialize(unsigned long long presentation, TimestampFormat format)
Month month() const
Month component of timestamp.
Timestamp(const Timestamp &other)
Initializes as copy of other instance.
Timestamp()
Initializes as Jan 1, 0001, 00:00:00.
unsigned int hour() const
Hour component of timestamp.
unsigned int millisecond() const
Millisecond component of timestamp.
Timestamp(unsigned year, Month month, unsigned day)
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.
static Timestamp deserialize(const std::string &)
De-serializes timestamp from text presentation.
unsigned int day() const
Day component of timestamp.
DayOfWeek dayOfWeek() const
Returns day of the week.
Timestamp date() const
Returns timestamp without time part.
Timestamp(const TimeSpan &)
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
unsigned int nanosecond() const
Nanosecond component of timestamp.
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.
unsigned int minute() const
Minute component of timestamp.
void date(Date &) const
Returns date component of timestamp.
unsigned int microsecond() const
Microsecond component of timestamp.
bool operator>(const Timestamp &other) const
Checks whether timestamp is greater than other one.
unsigned int second() const
Second component of timestamp.
unsigned int year() const
Year component of timestamp.
bool operator!=(const YearMonth &) const
Compares with other instance for inequality.
std::string toString() const
Serializes into text (YYYYMM) presentation.
YearMonth & operator=(const YearMonth &other)
bool operator==(const YearMonth &) const
Compares with other instance for equality.
void toString(std::string &) const
Serializes into text (YYYYMM) presentation.
YearMonth()
Initializes instance as Jan, 0001.
static YearMonth deserialize(unsigned long long)
YearMonth(unsigned int year, Month month)
YearMonth(unsigned int, Month, const NoVerify &)
YearMonth(const YearMonth &other)
Initializes as copy of other instance.
unsigned int year() const
Months::Enum Month
Identifies months in year.
TimestampFormats::Enum TimestampFormat
Timestamp format.
DaysOfWeek::Enum DayOfWeek
Identifies day within week.
TimeSpan operator-(const Date &left, const Date &right)
Calculates time interval between two given dates.
std::ostream & operator<<(std::ostream &, const Error &)
Make it printable to formatted C++ I/O streams.
TimeSpanFormats::Enum TimeSpanFormat
Time span format.
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.