DYSIZESection: Linux Programmer's Manual (3)Updated: November 12, 2001 |
DYSIZESection: Linux Programmer's Manual (3)Updated: November 12, 2001 |
#define _BSD_SOURCE /* or: #define _SVID_SOURCE */
#include <time.h>
int dysize(int year);
(year) %4 == 0 && ((year) %100 != 0 || (year) %400 == 0)
The formula is defined in the macro __isleap(year) also found in <time.h>.