Hyper API for C++
0.0.16638
Hyper client library for C++ applications
|
A timestamp data value. More...
#include <Timestamp.hpp>
Public Member Functions | |
Timestamp () noexcept | |
Default constructor. | |
Timestamp (Date date, Time time) noexcept | |
Creates a timestamp value with a date and a time component. More... | |
const Date & | getDate () const noexcept |
Gets the date component of the timestamp. More... | |
const Time & | getTime () const noexcept |
Gets the time component of the timestamp. More... | |
hyper_timestamp_t | getRaw () const noexcept |
Gets the raw timestamp value encoded as microseconds since 1 January 4713 BC. More... | |
std::string | toString () const |
Returns a string representation for debugging. More... | |
Friends | |
bool | operator== (const Timestamp &lhs, const Timestamp &rhs) noexcept |
Equality operator. | |
bool | operator> (const Timestamp &lhs, const Timestamp &rhs) noexcept |
Greater operator. | |
bool | operator!= (const Timestamp &a, const Timestamp &b) noexcept |
Not equal operator. | |
bool | operator< (const Timestamp &a, const Timestamp &b) noexcept |
Less than operator. | |
bool | operator<= (const Timestamp &a, const Timestamp &b) noexcept |
Less than or equal operator. | |
bool | operator>= (const Timestamp &a, const Timestamp &b) noexcept |
Greater or equal operator. | |
std::ostream & | operator<< (std::ostream &os, const Timestamp &obj) |
Stream output operator. | |
A timestamp data value.
Definition at line 16 of file Timestamp.hpp.
Creates a timestamp value with a date and a time component.
date | The date component. |
time | The time component. |
|
noexcept |
Gets the date component of the timestamp.
|
noexcept |
Gets the raw timestamp value encoded as microseconds since 1 January 4713 BC.
|
noexcept |
Gets the time component of the timestamp.
std::string hyperapi::Timestamp::toString | ( | ) | const |
Returns a string representation for debugging.
The returned string is in the format <date> <time>
, where <date>
is formatted as ±YYYY-MM-DD
and <time>
as HH:MM:SS.ssssss
.