1 /* $Id: date.h,v 1.1.1.1 1996/10/09 19:14:55 sverrehu Exp $ */ 2 #ifndef DATE_H 3 #define DATE_H 4 5 #ifdef __cplusplus 6 extern "C" { 7 #endif 8 9 typedef struct { 10 short year; /* Full year, like 1996 */ 11 char month; /* 1 - 12 */ 12 char day; /* 1 - 31 */ 13 } Date; 14 15 void dateSet(Date *date, int year, int month, int day); 16 int dateIsLeapYear(int year); 17 int dateDaysInMonth(int month, int year); 18 int dateGetNumDays(Date d0, Date d1); 19 void dateInc(Date *date); 20 char *dateStr(Date date); 21 Date dateFromStr(const char *s); 22 23 #ifdef __cplusplus 24 } 25 #endif 26 27 #endif 28