28#define TM_WDAY_SUN (0)
29#define TM_WDAY_MON (1)
30#define TM_WDAY_TUE (2)
31#define TM_WDAY_WED (3)
32#define TM_WDAY_THU (4)
33#define TM_WDAY_FRI (5)
34#define TM_WDAY_SAT (6)
36#define TM_MON_JAN ( 0)
37#define TM_MON_FEB ( 1)
38#define TM_MON_MAR ( 2)
39#define TM_MON_APR ( 3)
40#define TM_MON_MAY ( 4)
41#define TM_MON_JUN ( 5)
42#define TM_MON_JUL ( 6)
43#define TM_MON_AUG ( 7)
44#define TM_MON_SEP ( 8)
45#define TM_MON_OCT ( 9)
46#define TM_MON_NOV (10)
47#define TM_MON_DEC (11)
85#ifndef ATMEGA_INCOMPATIBLE_TIME_H
86void tm_get_wyday(
int year,
int mon,
int mday,
int *wday,
int *yday);
88void tm_get_wyday(
int year,
int mon,
int mday, int8_t *wday, int16_t *yday);
int tm_is_valid_time(int hour, int min, int sec)
Shallow test if a time is valid.
int tm_is_valid_date(int year, int mon, int mday)
Tests if a date is valid.
const int8_t TM_MON_DAYS[12]
The number of days in common years.
void tm_fill_derived_values(struct tm *tm)
Fills in struct tm::tm_wday and struct tm::tm_yday given a date.
void tm_get_wyday(int year, int mon, int mday, int *wday, int *yday)
Calculates the day of the year and the weekday of a given date.
const int16_t TM_MON_DAYS_ACCU[12]
The prefixsum of the number of days in common years.
int tm_doomsday(int year)
Returns the congruent weekday of the Doomsday (March 0).
int tm_is_leap_year(unsigned year)
Tells if a given year is a leap year in the Gregorian calendar.