Orcus
|
#include <types.hpp>
Public Member Functions | |
date_time_t (int _year, int _month, int _day) | |
date_time_t (int _year, int _month, int _day, int _hour, int _minute, double _second) | |
date_time_t (const date_time_t &other) | |
date_time_t & | operator= (date_time_t other) |
bool | operator== (const date_time_t &other) const |
bool | operator!= (const date_time_t &other) const |
bool | operator< (const date_time_t &other) const |
std::string | to_string () const |
void | swap (date_time_t &other) |
Static Public Member Functions | |
static date_time_t | from_chars (std::string_view str) |
Public Attributes | |
int | year |
int | month |
int | day |
int | hour |
int | minute |
double | second |
Struct that holds a date or date-time value.
|
static |
Parse an ISO-formatted string representation of a date-time value, and convert it into a date_time_t value. A string representation allows either a date only or a date and time value, but it does not allow a time only value.
Here are some examples of ISO-formatted date and date-time values:
str | string representation of a date-time value. |
void orcus::date_time_t::swap | ( | date_time_t & | other | ) |
Swap the value with another instance.
other | another instance to swap values with. |
std::string orcus::date_time_t::to_string | ( | ) | const |
Convert the date-time value to an ISO-formatted string representation.