27 namespace OnixS {
namespace ICE {
namespace iMpact {
namespace MarketData {
64 TimeSpan(
int hours,
int minutes,
int seconds,
int nanoseconds = 0);
72 TimeSpan(
int days,
int hours,
int minutes,
int seconds,
int nanoseconds);
76 TimeSpan(
long long totalSeconds,
int nanoseconds);
82 long long totalSeconds()
const;
102 int milliseconds()
const;
106 int microseconds()
const;
110 int nanoseconds()
const;
113 bool operator==(
const TimeSpan& other)
const;
116 bool operator!=(
const TimeSpan& other)
const;
119 bool operator<(
const TimeSpan& other)
const;
122 bool operator>(
const TimeSpan& other)
const;
142 static TimeSpan deserialize(
const std::string& str);
145 static TimeSpan deserialize(
unsigned long long presentation, TimeSpanFormat format);
169 toString(str, format);
201 static Enum deserialize(
const char*);
204 static const char* toString(
Enum);
227 static Enum deserialize(
const char*);
230 static const char* toString(
Enum);
249 YearMonth(
unsigned int year, Month month);
256 unsigned int year()
const;
272 std::string toString()
const;
275 void toString(std::string&)
const;
279 static YearMonth deserialize(
unsigned long long);
329 Date(
unsigned int year, Month month,
unsigned int day);
336 unsigned int day()
const;
339 bool operator==(
const Date& other)
const;
342 bool operator!=(
const Date& other)
const;
345 bool operator<(
const Date& other)
const;
348 bool operator>(
const Date& other)
const;
360 std::string toString()
const;
363 void toString(std::string&)
const;
367 static Date deserialize(
unsigned long long);
373 Date(
unsigned int year, Month month,
unsigned int day,
const NoVerify&);
394 ONIXS_ICEMDH_EXPORT std::ostream&
operator<<(std::ostream&,
const Date&);
427 Timestamp(
unsigned year, Month month,
unsigned day);
452 unsigned int year()
const;
458 unsigned int day()
const;
461 unsigned int hour()
const;
464 unsigned int minute()
const;
467 unsigned int second()
const;
470 unsigned int millisecond()
const;
473 unsigned int microsecond()
const;
476 unsigned int nanosecond()
const;
482 void date(
Date&)
const;
488 DayOfWeek dayOfWeek()
const;
491 bool operator==(
const Timestamp& other)
const;
494 bool operator!=(
const Timestamp& other)
const;
497 bool operator<(
const Timestamp& other)
const;
500 bool operator>(
const Timestamp& other)
const;
528 static Timestamp deserialize(
const std::string&);
532 static Timestamp deserialize(
unsigned long long presentation, TimestampFormat format);
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());
575 toString(str, format);
unsigned int nanosecond() const
Nanosecond component of timestamp.
unsigned int second() const
Second component of timestamp.
unsigned int microsecond() const
Microsecond component of timestamp.
TimeSpan operator-(const Date &left, const Date &right)
Calculates time interval between two given dates.
DaysOfWeek::Enum DayOfWeek
Identifies day within week.
Months::Enum Month
Identifies months in year.
TimestampFormats::Enum TimestampFormat
Timestamp format.
Identifies day within week.
std::ostream & operator<<(std::ostream &, const Error &)
Make it printable to formatted C++ I/O streams.
static const TimeSpan Zero
Time interval of zero length.
std::string toString(TimestampFormat format=TimestampFormats::YYYYMMDDHHMMSSnsec) const
std::string toString() const
Serializes into text (YYYYMM) presentation.
unsigned int year() const
long long totalSeconds() const
Whole number of seconds in time interval.
unsigned int hour() const
Hour component of timestamp.
TimeSpanFormats::Enum TimeSpanFormat
Time span format.
std::string toString() const
Serializes date into YYYYMMDD presentation.
unsigned int millisecond() const
Millisecond component of timestamp.
Identifies months in year.
Represents date without time component.
Represents timestamp without time-zone information.
void toString(std::string &str, TimeSpanFormat format=TimeSpanFormats::SDHHMMSSnsec) const
unsigned int minute() const
Minute component of timestamp.