![]() |
NumCpp
2.16.0
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 | |
| double | fractionalSecond () const noexcept |
| fractionalSecond getter | |
| int | hour () const noexcept |
| hour getter | |
| int | minute () const noexcept |
| minute getter | |
| int | month () const noexcept |
| month getter | |
| int | second () const noexcept |
| second getter | |
| void | setDay (int day) |
| day setter | |
| void | setFractionalSecond (double fractionalSecond) |
| fractionalSecond setter | |
| void | setHour (int hour) |
| hour setter | |
| void | setMinute (int minute) |
| minute setter | |
| void | setMonth (int month) |
| month setter | |
| void | setSecond (int second) |
| second setter | |
| void | setYear (int year) |
| year setter | |
| std::string | toStr () const |
| Converts the struct to an iso string. | |
| TimePoint | toTimePoint () const |
| Converts the struct to a TimePoint. | |
| int | year () const noexcept |
| year getter | |
Static Public Member Functions | |
| static DateTime | now () noexcept |
| Factory static method for returning a DateTime object cooresponding to the system clock now. | |
| static TimePoint | strToTimepoint (const std::string ×tamp) |
| Converts the struct to an iso string. | |
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
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
|
inlinenoexcept |
second getter
fractionalSecond setter
| fractionalSecond | fractionalSecond value |
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