41 #define JULIAN_DAY_NUMBER_AT_ABSOLUTE_DAY_ONE INT64_C(1721425)
43 #define DAYS_IN_NORMAL_YEAR INT32_C(365)
44 #define DAYS_IN_LEAP_YEAR INT32_C(366)
46 #define UNIX_EPOCH_MIN_YEARS 1970
47 #define UNIX_EPOCH_MAX_YEARS 2038
49 #define CALENDAR_YY_PART_YEAR 70
61 #define GREGORIAN_DAYS_IN_400_YEARS UINT32_C(146097)
62 #define GREGORIAN_DAYS_IN_100_YEARS UINT32_C(36524)
63 #define GREGORIAN_DAYS_IN_4_YEARS UINT32_C(1461)
123 , uint32_t *month_out
124 , uint32_t *day_out);
138 , uint32_t *month_out
139 , uint32_t *day_out);
190 inline static bool num_leap_years(uint32_t y,
enum calendar c)
192 return (c == GREGORIAN
224 uint32_t
day_of_week(int64_t day_number,
bool sunday_is_first_day_of_week);
272 ,
bool sunday_is_first_day_of_week);
int32_t number_of_leap_years_gregorian(uint32_t year)
uint32_t days_in_gregorian_year_month(uint32_t year, uint32_t month)
bool is_valid_gregorian_date(uint32_t year, uint32_t month, uint32_t day)
static bool is_leap_year(uint32_t y, enum calendar c)
static bool is_julian_leap_year(uint32_t y)
uint32_t year_month_to_months(uint32_t year_month)
int64_t julian_day_number_from_gregorian_date(uint32_t year, uint32_t month, uint32_t day)
uint32_t days_in_year_gregorian(const uint32_t year)
uint32_t months_to_year_month(uint32_t months)
uint32_t days_in_year_julian(const uint32_t year)
uint32_t days_in_year(const uint32_t year, enum calendar calendar)
void gregorian_date_from_absolute_day_number(int64_t absolute_day, uint32_t *year_out, uint32_t *month_out, uint32_t *day_out)
static bool is_gregorian_leap_year(uint32_t y)
void gregorian_date_from_julian_day_number(int64_t julian_day, uint32_t *year_out, uint32_t *month_out, uint32_t *day_out)
bool in_unix_epoch_range(uint32_t year, uint32_t month, uint32_t day, uint32_t hour, uint32_t minute, uint32_t second)
uint32_t iso_week_number_from_gregorian_date(uint32_t year, uint32_t month, uint32_t day)
int64_t absolute_day_number_to_julian_day_number(int64_t absolute_day)
int32_t number_of_leap_years_julian(uint32_t year)
uint32_t day_of_week(int64_t day_number, bool sunday_is_first_day_of_week)
uint32_t week_number_from_gregorian_date(uint32_t year, uint32_t month, uint32_t day, bool sunday_is_first_day_of_week)
int64_t julian_day_number_to_absolute_day_number(int64_t julian_day)