#include <nap/datetime.h>
Public Member Functions | |
Date ()=default | |
Date (int year, EMonth month, int day) | |
Date (const SystemTimeStamp &systemTime) | |
void | fromSystemTime (const SystemTimeStamp &systemTime) |
SystemTimeStamp | toSystemTime () const |
bool | valid () const |
Static Public Member Functions | |
static bool | exists (int year, EMonth month, int day) |
Public Attributes | |
EMonth | mMonth = EMonth::Unknown |
Property: 'Month' the month of the year. More... | |
int | mDay = 1 |
Property: 'Day' the day of the month (1-31) More... | |
int | mYear = 1970 |
Property: 'Year' the year. More... | |
Serializable date structure that can be converted into a system time stamp. Use this when serialization / de-serialization of a date is required. This is a relatively light weight object that can be both copy and move constructed or assigned.
|
default |
Default constructor
Date | ( | const SystemTimeStamp & | systemTime | ) |
Constructor based on given system time. Extracts the date from the time stamp.
systemTime | the time stamp to extract the date from. |
|
static |
Helper function to check if a specific date exists. Gregorian dates started in 1582.
year | the year |
month | the month |
day | the day in the month |
void fromSystemTime | ( | const SystemTimeStamp & | systemTime | ) |
Extracts a date from a system time stamp
systemTime | the time stamp to extract the date from |
SystemTimeStamp toSystemTime | ( | ) | const |
Converts a system time stamp into a date
bool valid | ( | ) | const |
Helper function to check if the date exists.
int mDay = 1 |
Property: 'Day' the day of the month (1-31)
EMonth mMonth = EMonth::Unknown |
Property: 'Month' the month of the year.
int mYear = 1970 |
Property: 'Year' the year.