NumCpp
2.12.1
A Templatized Header Only C++ Implementation of the Python NumPy Library
|
Date Time class for working with iso formatted date times. More...
#include <DateTime.hpp>
Public Member Functions | |
DateTime ()=default | |
DateTime (const std::string ×tamp) | |
DateTime (const TimePoint &tp) | |
DateTime (int year, int month, int day, int hour, int minute, int second, double fractionalSecond=0.0) noexcept | |
int | day () const noexcept |
day getter More... | |
double | fractionalSecond () const noexcept |
fractionalSecond getter More... | |
int | hour () const noexcept |
hour getter More... | |
int | minute () const noexcept |
minute getter More... | |
int | month () const noexcept |
month getter More... | |
int | second () const noexcept |
second getter More... | |
void | setDay (int day) |
day setter More... | |
void | setFractionalSecond (double fractionalSecond) |
fractionalSecond setter More... | |
void | setHour (int hour) |
hour setter More... | |
void | setMinute (int minute) |
minute setter More... | |
void | setMonth (int month) |
month setter More... | |
void | setSecond (int second) |
second setter More... | |
void | setYear (int year) |
year setter More... | |
std::string | toStr () const |
Converts the struct to an iso string. More... | |
TimePoint | toTimePoint () const |
Converts the struct to a TimePoint. More... | |
int | year () const noexcept |
year getter More... | |
Static Public Member Functions | |
static DateTime | now () noexcept |
Factory static method for returning a DateTime object cooresponding to the system clock now. More... | |
static TimePoint | strToTimepoint (const std::string ×tamp) |
Converts the struct to an iso string. More... | |
Static Public Attributes | |
static constexpr int | MAX_DAY = 31 |
static constexpr int | MAX_HOUR = 23 |
static constexpr int | MAX_MINUTE = 59 |
static constexpr int | MAX_MONTH = 12 |
static constexpr int | MAX_SECOND = 59 |
Date Time class for working with iso formatted date times.
|
default |
Constructor
|
inlineexplicit |
Constructor
tp | a timepoint object |
|
inlineexplicit |
Constructor
timestamp | an iso formatted datetime string (0001-01-01T00:00:00.00000Z) |
|
inlinenoexcept |
Constructor
year | year value |
month | month value |
day | day value |
hour | hour value |
minute | minute value |
second | second value |
fractionalSecond | fractionalSecond value |
|
inlinenoexcept |
day getter
|
inlinenoexcept |
fractionalSecond getter
|
inlinenoexcept |
hour getter
|
inlinenoexcept |
minute getter
|
inlinenoexcept |
month getter
|
inlinestaticnoexcept |
|
inlinenoexcept |
second getter
|
inline |
day setter
day | day value |
|
inline |
fractionalSecond setter
fractionalSecond | fractionalSecond value |
|
inline |
hour setter
hour | hour value |
|
inline |
minute setter
minute | minute value |
|
inline |
month setter
month | month value |
|
inline |
second setter
second | second value |
|
inline |
year setter
year | year value |
|
inlinestatic |
Converts the struct to an iso string.
timestamp | an iso formatted datetime string (0001-01-01T00:00:00.00000Z) |
|
inline |
Converts the struct to an iso string.
|
inline |
Converts the struct to a TimePoint.
|
inlinenoexcept |
year getter
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |