include/time/date_time.h View source View on GitHub
struct date_time {
year_t year;
day_t day;
uint32_t sec;
};
struct date_time_zone {
int16_t utc_offset_min;
int16_t dst_offset_min;
};
struct date_time_expanded {
year_t year;
uint8_t month;
uint8_t day_of_month;
uint8_t day_of_week;
uint8_t hour;
uint8_t minute;
uint8_t second;
};
typedef uint16_t year_t;
typedef uint16_t day_t;
bool is_leap_year(year_t year);
uint32_t days_in_month(int year, int month);
struct date_time_expanded date_time_expand(const struct date_time *dt);
void date_time_compact(const struct date_time_expanded *expanded, struct date_time *out);