Go to the documentation of this file. 1 #define IS_LEAP_YEAR(y) ( (!((y)%4) && (y)%100) || !((y)%400) )
3 int day2mday(
int year,
int day_of_year,
int *month,
int *day_of_month)
30 static char days_per_month[] = {
31 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
38 days_per_month[1] = 29;
40 days_per_month[1] = 28;
42 for (month_index = 0, date = day_of_year;
43 date > days_per_month[month_index];
44 date -= days_per_month[month_index++])
50 *month = month_index + 1;
int day2mday(int year, int day_of_year, int *month, int *day_of_month)