fixed some leapyear problems

This commit is contained in:
ceriel
1989-06-19 09:50:38 +00:00
parent e9f2b9999b
commit bf9b3eb667
2 changed files with 6 additions and 5 deletions

View File

@@ -8,7 +8,8 @@
static int monthsize[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
#define SECS_DAY (24*60L*60L)
#define YEARSIZE(year) ((year) % 4 ? 365 : 366)
#define LEAPYEAR(year) (!((year) % 4) && (((year) % 100) || !((year) % 400)))
#define YEARSIZE(year) (LEAPYEAR(year) ? 366 : 365)
struct tm *
gmtime(clock)