#include <nap/datetime.h>
Public Types | |
enum | ConversionMode : int { Local = 0, GMT = 1 } |
Public Member Functions | |
DateTime () | |
DateTime (const SystemTimeStamp &timeStamp, ConversionMode mode) | |
DateTime (const SystemTimeStamp &timeStamp) | |
~DateTime ()=default | |
int | getYear () const |
EMonth | getMonth () const |
int | getWeek () const |
int | getDayInTheMonth () const |
int | getDayInTheYear () const |
EDay | getDay () const |
int | getHour () const |
int | getMinute () const |
int | getSecond () const |
int | getMilliSecond () const |
bool | isDaylightSaving () const |
std::string | toString () const |
void | setTimeStamp (const SystemTimeStamp &timeStamp) |
const SystemTimeStamp & | getTimeStamp () const |
bool | operator< (const DateTime &other) const |
bool | operator== (const DateTime &other) const |
bool | operator!= (const DateTime &other) const |
bool | operator<= (const DateTime &other) const |
bool | operator>= (const DateTime &other) const |
Represents a point in time based on a system time stamp. This is a run-time only class that wraps a system time stamp for easier readability and use. To actually save (serialize) or read (deserialize) a particular point in time use a nap::TimeStamp or nap::Date object.
|
strong |
DateTime | ( | ) |
The object is constructed using the system's local date and time
DateTime | ( | const SystemTimeStamp & | timeStamp, |
ConversionMode | mode | ||
) |
timeStamp | the time that defines this object's date and time |
mode | the way time is interpreted, local includes possible daylight savings, GMT does not |
DateTime | ( | const SystemTimeStamp & | timeStamp | ) |
When using this constructor time is interpreted as Local to the computer and includes daylight saving adjustments
timeStamp | the time that defines this object's date and time |
|
default |
EDay getDay | ( | ) | const |
int getDayInTheMonth | ( | ) | const |
int getDayInTheYear | ( | ) | const |
int getHour | ( | ) | const |
int getMilliSecond | ( | ) | const |
int getMinute | ( | ) | const |
EMonth getMonth | ( | ) | const |
int getSecond | ( | ) | const |
const SystemTimeStamp& getTimeStamp | ( | ) | const |
int getWeek | ( | ) | const |
int getYear | ( | ) | const |
bool isDaylightSaving | ( | ) | const |
bool operator!= | ( | const DateTime & | other | ) | const |
bool operator< | ( | const DateTime & | other | ) | const |
bool operator<= | ( | const DateTime & | other | ) | const |
bool operator== | ( | const DateTime & | other | ) | const |
bool operator>= | ( | const DateTime & | other | ) | const |
void setTimeStamp | ( | const SystemTimeStamp & | timeStamp | ) |
Sets the time stamp that is used to define this object's date and time
timeStamp | the new TimeStamp |
std::string toString | ( | ) | const |