9#ifndef MAXOS_COMMON_TIME_H
10#define MAXOS_COMMON_TIME_H
15namespace MaxOS::common {
39 return (
year % 4 == 0 &&
year % 100 != 0) ||
year % 400 == 0;
45 static const char* Months[] = {
61 static const char* Days[] = {
105 for(
uint8_t month = 0; month <
time.month - 1; month++)
Stores the left, top, width and height of a rectangle.
Stores the year, month, day, hour, minute and second of a time.
uint8_t minute
The minute (0-59)
uint8_t month
The month (1-12)
bool is_leap_year() const
Checks if the year is a leap year.
uint8_t second
The second (0-59)
uint8_t day
The day (1-31)
uint8_t hour
The hour (0-23)
constexpr uint16_t DAYS_PER_LEAP_YEAR
Number of days in a leap year.
constexpr uint8_t DAYS_IN_MONTH[]
Number of days in each month indexed by month number - 1.
constexpr uint16_t DAYS_PER_YEAR
Number of days in a non-leap year.