Hyper API for C++ 0.0.18825
Hyper client library for C++ applications
Loading...
Searching...
No Matches
hyperapi::Timestamp Class Referencefinal

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.
 
const DategetDate () const noexcept
 Gets the date component of the timestamp.
 
const TimegetTime () 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.
 

Detailed Description

A timestamp data value.

Definition at line 16 of file Timestamp.hpp.

Constructor & Destructor Documentation

◆ Timestamp() [1/2]

hyperapi::Timestamp::Timestamp ( )
inlinenoexcept

Default constructor.

Definition at line 21 of file Timestamp.hpp.

◆ Timestamp() [2/2]

hyperapi::Timestamp::Timestamp ( Date  date,
Time  time 
)
noexcept

Creates a timestamp value with a date and a time component.

Parameters
dateThe date component.
timeThe time component.

Member Function Documentation

◆ getDate()

const Date & hyperapi::Timestamp::getDate ( ) const
noexcept

Gets the date component of the timestamp.

Returns
The date component.

◆ getRaw()

hyper_timestamp_t hyperapi::Timestamp::getRaw ( ) const
noexcept

Gets the raw timestamp value encoded as microseconds since 1 January 4713 BC.

Returns
The raw timestamp value.

◆ getTime()

const Time & hyperapi::Timestamp::getTime ( ) const
noexcept

Gets the time component of the timestamp.

Returns
The time component.

◆ toString()

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.


The documentation for this class was generated from the following file: