Hyper API for C++ 0.0.20746
Hyper client library for C++ applications
|
A timestamp data value. More...
#include <Timestamp.hpp>
Classes | |
struct | raw_t |
Marker struct for the raw timestamp constructor. More... | |
Public Member Functions | |
Timestamp () noexcept | |
Default constructor. | |
Timestamp (Date date, Time time) noexcept | |
Creates a timestamp value with a date and a time component. | |
Timestamp (hyper_timestamp_t rawTimestamp, raw_t) noexcept | |
Creates a timestamp from a raw timestamp value encoded as microseconds since 1 January 4713 BC. | |
const Date & | getDate () const noexcept |
Gets the date component of the timestamp. | |
const Time & | getTime () const noexcept |
Gets the time component of the timestamp. | |
hyper_timestamp_t | getRaw () const noexcept |
Gets the raw timestamp value encoded as microseconds since 1 January 4713 BC. | |
std::string | toString () const |
Returns a string representation for debugging. | |
A timestamp data value.
Definition at line 16 of file Timestamp.hpp.
struct hyperapi::Timestamp::raw_t |
Marker struct for the raw timestamp constructor.
Definition at line 21 of file Timestamp.hpp.
|
inlinenoexcept |
Default constructor.
Definition at line 26 of file Timestamp.hpp.
Creates a timestamp value with a date and a time component.
date | The date component. |
time | The time component. |
|
explicitnoexcept |
Creates a timestamp from a raw timestamp value encoded as microseconds since 1 January 4713 BC.
rawTimestamp | The raw timestamp value. |
|
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
.