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;
263 bool operator ==(
const YearMonth&)
const;
266 bool operator !=(
const YearMonth&)
const;
272 std::string toString()
const;
275 void toString(std::string&)
const;
279 static YearMonth deserialize(
unsigned long long);
327 Date(
unsigned int year, Month month,
unsigned int day);
334 unsigned int day()
const;
337 bool operator ==(
const Date& other)
const;
340 bool operator !=(
const Date& other)
const;
343 bool operator <(
const Date& other)
const;
346 bool operator >(
const Date& other)
const;
355 Date& operator =(
const Date& other);
358 std::string toString()
const;
361 void toString(std::string&)
const;
365 static Date deserialize(
unsigned long long);
371 Date(
unsigned int year, Month month,
unsigned int day,
const NoVerify&);
392 ONIXS_ICEMDH_EXPORT std::ostream&
operator<<(std::ostream&,
const Date&);
425 Timestamp(
unsigned year, Month month,
unsigned day);
439 ,
unsigned nanosecond
450 unsigned int year()
const;
456 unsigned int day()
const;
459 unsigned int hour()
const;
462 unsigned int minute()
const;
465 unsigned int second()
const;
468 unsigned int millisecond()
const;
471 unsigned int microsecond()
const;
474 unsigned int nanosecond()
const;
480 void date(
Date&)
const;
486 DayOfWeek dayOfWeek()
const;
489 bool operator ==(
const Timestamp& other)
const;
492 bool operator !=(
const Timestamp& other)
const;
495 bool operator <(
const Timestamp& other)
const;
498 bool operator >(
const Timestamp& other)
const;
526 static Timestamp deserialize(
const std::string&);
530 static Timestamp deserialize(
unsigned long long presentation, TimestampFormat format);
541 return static_cast<unsigned int>(sinceEpoch_.hours());
546 return static_cast<unsigned int>(sinceEpoch_.minutes());
551 return static_cast<unsigned int>(sinceEpoch_.seconds());
556 return static_cast<unsigned int>(sinceEpoch_.milliseconds());
561 return static_cast<unsigned int>(sinceEpoch_.microseconds());
566 return static_cast<unsigned int>(sinceEpoch_.nanoseconds());
573 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.