StuBS
|
Date and Time. More...
#include <object/time.h>
Public Member Functions | |
DateTime () | |
Default constructor. | |
DateTime (uint32_t epoch) | |
Construct from a timestamp (Unix epoch time) | |
uint32_t | toTimestamp () const |
Convert to Unix epoch time. | |
Public Attributes | |
uint8_t | second |
Second (0 - 59 ) | |
uint8_t | minute |
Minute (0 - 59 ) | |
uint8_t | hour |
Hour (0 - 23 ) | |
uint8_t | weekday |
Weekday (1 (Sun) - 7 (Sat)) | |
uint8_t | day |
Day of Month (1 - 31 ) | |
uint8_t | month |
Month (1 - 12 ) | |
uint16_t | year |
Year (0 (2000) - 99 (2099)) | |
Static Public Attributes | |
static const char *const | weekdays [8] |
Name of weekdays. | |
static const char *const | months [13] |
Name of months. | |
Date and Time.
|
inline |
Default constructor.
|
explicit |
Construct from a timestamp (Unix epoch time)
uint32_t DateTime::toTimestamp | ( | ) | const |
Convert to Unix epoch time.
uint8_t DateTime::second |
Second (0
- 59
)
uint8_t DateTime::minute |
Minute (0
- 59
)
uint8_t DateTime::hour |
Hour (0
- 23
)
uint8_t DateTime::weekday |
Weekday (1
(Sun) - 7
(Sat))
uint8_t DateTime::day |
Day of Month (1
- 31
)
uint8_t DateTime::month |
Month (1
- 12
)
uint16_t DateTime::year |
Year (0
(2000) - 99
(2099))
Name of weekdays.
Name of months.