24 #include <OnixS/Senaf/MarketData/Export.h> 28 namespace OnixS {
namespace Senaf {
namespace MarketData {
65 TimeSpan(
int hours,
int minutes,
int seconds,
int nanoseconds = 0);
73 TimeSpan(
int days,
int hours,
int minutes,
int seconds,
int nanoseconds);
77 TimeSpan(
long long totalSeconds,
int nanoseconds);
83 long long totalSeconds()
const;
103 int milliseconds()
const;
107 int microseconds()
const;
111 int nanoseconds()
const;
114 bool operator==(
const TimeSpan& other)
const;
117 bool operator!=(
const TimeSpan& other)
const;
120 bool operator<(
const TimeSpan& other)
const;
123 bool operator>(
const TimeSpan& other)
const;
143 static TimeSpan deserialize(
const std::string& str);
146 static TimeSpan deserialize(
unsigned long long presentation, TimeSpanFormat format);
170 toString(str, format);
199 static Enum deserialize(
const char*);
202 static const char* toString(
Enum);
225 static Enum deserialize(
const char*);
228 static const char* toString(
Enum);
247 YearMonth(
unsigned int year, Month month);
254 unsigned int year()
const;
270 std::string toString()
const;
273 void toString(std::string&)
const;
277 static YearMonth deserialize(
unsigned long long);
324 Date(
unsigned int year, Month month,
unsigned int day);
331 unsigned int day()
const;
334 bool operator==(
const Date& other)
const;
337 bool operator!=(
const Date& other)
const;
340 bool operator<(
const Date& other)
const;
343 bool operator>(
const Date& other)
const;
355 std::string toString()
const;
358 void toString(std::string&)
const;
362 static Date deserialize(
unsigned long long);
368 Date(
unsigned int year, Month month,
unsigned int day,
const NoVerify&);
419 Timestamp(
unsigned year, Month month,
unsigned day);
444 unsigned int year()
const;
450 unsigned int day()
const;
453 unsigned int hour()
const;
456 unsigned int minute()
const;
459 unsigned int second()
const;
462 unsigned int millisecond()
const;
465 unsigned int microsecond()
const;
468 unsigned int nanosecond()
const;
474 void date(
Date&)
const;
480 DayOfWeek dayOfWeek()
const;
483 bool operator==(
const Timestamp& other)
const;
486 bool operator!=(
const Timestamp& other)
const;
489 bool operator<(
const Timestamp& other)
const;
492 bool operator>(
const Timestamp& other)
const;
520 static Timestamp deserialize(
const std::string&);
524 static Timestamp deserialize(
unsigned long long presentation, TimestampFormat format);
535 return static_cast<unsigned int>(sinceEpoch_.hours());
540 return static_cast<unsigned int>(sinceEpoch_.minutes());
545 return static_cast<unsigned int>(sinceEpoch_.seconds());
550 return static_cast<unsigned int>(sinceEpoch_.milliseconds());
555 return static_cast<unsigned int>(sinceEpoch_.microseconds());
560 return static_cast<unsigned int>(sinceEpoch_.nanoseconds());
567 toString(str, format);
Represents date without time component.
std::string toString() const
Serializes into text (YYYYMM) presentation.
std::string toString() const
Serializes date into YYYYMMDD presentation.
static const TimeSpan Zero
Time interval of zero length.
unsigned int nanosecond() const
Nanosecond component of timestamp.
Identifies months in year.
Months::Enum Month
Identifies months in year.
long long totalSeconds() const
Whole number of seconds in time interval.
std::string toString(TimestampFormat format=TimestampFormats::YYYYMMDDHHMMSSnsec) const
unsigned int millisecond() const
Millisecond component of timestamp.
TimeSpan operator-(const Date &left, const Date &right)
Calculates time interval between two given dates.
TimeSpanFormats::Enum TimeSpanFormat
Time span format.
Represents timestamp without time-zone information.
void toString(std::string &str, TimeSpanFormat format=TimeSpanFormats::SDHHMMSSnsec) const
unsigned int microsecond() const
Microsecond component of timestamp.
unsigned int year() const
Identifies day within week.
DaysOfWeek::Enum DayOfWeek
Identifies day within week.
unsigned int second() const
Second component of timestamp.
TimestampFormats::Enum TimestampFormat
Timestamp format.
unsigned int minute() const
Minute component of timestamp.
unsigned int hour() const
Hour component of timestamp.