A date data value.
More...
#include <Date.hpp>
|
| Date () noexcept |
| Default constructor.
|
|
| Date (int32_t year, std::int16_t month, std::int16_t day) noexcept |
| Creates a date value. More...
|
|
std::int16_t | getDay () const noexcept |
| Gets the day. More...
|
|
std::int16_t | getMonth () const noexcept |
| Gets the month. More...
|
|
std::int32_t | getYear () const noexcept |
| Gets the year. More...
|
|
std::string | toString () const |
| Gets a string representation for debugging. More...
|
|
hyper_date_t | getRaw () const noexcept |
| Gets the raw date value (i.e., the Julian Day). More...
|
|
A date data value.
- Examples
- insert_data_into_multiple_tables.cpp.
Definition at line 18 of file Date.hpp.
◆ Date()
hyperapi::Date::Date |
( |
int32_t |
year, |
|
|
std::int16_t |
month, |
|
|
std::int16_t |
day |
|
) |
| |
|
noexcept |
Creates a date value.
- Parameters
-
year | The year. To specify BC dates, you must convert the BC year to a negative year (e.g., 10 BC = -9). |
month | The month. |
day | The day. |
- Precondition
year
, month
, and day
must define a valid date after 4800 BC.
◆ getDay()
std::int16_t hyperapi::Date::getDay |
( |
| ) |
const |
|
noexcept |
Gets the day.
- Returns
- The day.
◆ getMonth()
std::int16_t hyperapi::Date::getMonth |
( |
| ) |
const |
|
noexcept |
Gets the month.
- Returns
- The month.
◆ getRaw()
hyper_date_t hyperapi::Date::getRaw |
( |
| ) |
const |
|
noexcept |
Gets the raw date value (i.e., the Julian Day).
- Returns
- The raw date value.
◆ getYear()
std::int32_t hyperapi::Date::getYear |
( |
| ) |
const |
|
noexcept |
Gets the year.
- Returns
- The year.
◆ toString()
std::string hyperapi::Date::toString |
( |
| ) |
const |
Gets a string representation for debugging.
- Returns
- the date in the '±YYYY-MM-DD' format
The documentation for this class was generated from the following file: