22 #include <OnixS/Senaf/MarketData/Export.h> 26 namespace OnixS {
namespace Senaf {
namespace MarketData {
63 TimeSpan(
int hours,
int minutes,
int seconds,
int nanoseconds = 0);
71 TimeSpan(
int days,
int hours,
int minutes,
int seconds,
int nanoseconds);
75 TimeSpan(
long long totalSeconds,
int nanoseconds);
81 long long totalSeconds()
const;
101 int milliseconds()
const;
105 int microseconds()
const;
109 int nanoseconds()
const;
112 bool operator ==(
const TimeSpan& other)
const;
115 bool operator !=(
const TimeSpan& other)
const;
118 bool operator <(
const TimeSpan& other)
const;
121 bool operator >(
const TimeSpan& other)
const;
141 static TimeSpan deserialize(
const std::string& str);
144 static TimeSpan deserialize(
unsigned long long presentation, TimeSpanFormat format);
168 toString(str, format);
197 static Enum deserialize(
const char*);
200 static const char* toString(
Enum);
223 static Enum deserialize(
const char*);
226 static const char* toString(
Enum);
245 YearMonth(
unsigned int year, Month month);
252 unsigned int year()
const;
259 bool operator ==(
const YearMonth&)
const;
262 bool operator !=(
const YearMonth&)
const;
268 std::string toString()
const;
271 void toString(std::string&)
const;
275 static YearMonth deserialize(
unsigned long long);
320 Date(
unsigned int year, Month month,
unsigned int day);
327 unsigned int day()
const;
330 bool operator ==(
const Date& other)
const;
333 bool operator !=(
const Date& other)
const;
336 bool operator <(
const Date& other)
const;
339 bool operator >(
const Date& other)
const;
348 Date& operator =(
const Date& other);
351 std::string toString()
const;
354 void toString(std::string&)
const;
358 static Date deserialize(
unsigned long long);
364 Date(
unsigned int year, Month month,
unsigned int day,
const NoVerify&);
415 Timestamp(
unsigned year, Month month,
unsigned day);
429 ,
unsigned nanosecond
440 unsigned int year()
const;
446 unsigned int day()
const;
449 unsigned int hour()
const;
452 unsigned int minute()
const;
455 unsigned int second()
const;
458 unsigned int millisecond()
const;
461 unsigned int microsecond()
const;
464 unsigned int nanosecond()
const;
470 void date(
Date&)
const;
476 DayOfWeek dayOfWeek()
const;
479 bool operator ==(
const Timestamp& other)
const;
482 bool operator !=(
const Timestamp& other)
const;
485 bool operator <(
const Timestamp& other)
const;
488 bool operator >(
const Timestamp& other)
const;
516 static Timestamp deserialize(
const std::string&);
520 static Timestamp deserialize(
unsigned long long presentation, TimestampFormat format);
531 return static_cast<unsigned int>(sinceEpoch_.hours());
536 return static_cast<unsigned int>(sinceEpoch_.minutes());
541 return static_cast<unsigned int>(sinceEpoch_.seconds());
546 return static_cast<unsigned int>(sinceEpoch_.milliseconds());
551 return static_cast<unsigned int>(sinceEpoch_.microseconds());
556 return static_cast<unsigned int>(sinceEpoch_.nanoseconds());
563 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.