Time management.
#include <srl_datetime.hpp>
Public Member Functions | |
| DateTime (const BupDate *date) | |
| Construct a new time object from backup unit date. | |
| DateTime (uint8_t second, uint8_t minute, uint8_t hour, uint8_t day, uint8_t week, uint8_t month, uint16_t year) | |
| Construct a new time object. | |
| constexpr uint8_t | Day () |
| Gets date day. | |
| constexpr uint8_t | Hour () |
| Gets clock hours. | |
| constexpr uint8_t | Minute () |
| Gets clock minutes. | |
| constexpr uint8_t | Month () |
| Gets date month. | |
| constexpr uint8_t | Second () |
| Gets clock seconds. | |
| constexpr BupDate | ToBackupUnitDate () |
| Convert date into backup unit format. | |
| constexpr uint8_t | Week () |
| Gets date week. | |
| constexpr uint16_t | Year () |
| Gets date year. | |
Operators | |
| constexpr bool | operator> (const DateTime &date) const |
| Check if current date comes after another date. | |
| constexpr bool | operator>= (const DateTime &date) const |
| Check if current date comes after or is same as another date. | |
| constexpr bool | operator< (const DateTime &date) const |
| Check if current date comes before another date. | |
| constexpr bool | operator<= (const DateTime &date) const |
| Check if current date comes before or is same as another date. | |
| constexpr bool | operator== (const DateTime &date) const |
| Check if current date is same as another date. | |
| constexpr bool | operator!= (const DateTime &date) const |
| Check if current date is not the same as another date. | |
Static Public Member Functions | |
| static DateTime | Now () |
| Gets current RTC value. | |
Static Public Attributes | |
| static constexpr const uint16_t | BaseYear = 1980 |
| Base year to count time from. | |