From a9251605ba3f3083615da9782d22a384b1fd88f8 Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Tue, 9 Apr 1996 19:48:31 +0000 Subject: [PATCH] Easter was one day to fast. Unix use days *since* January 1 [0-365], not the 1th day of year etc. --- usr.bin/calendar/day.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/calendar/day.c b/usr.bin/calendar/day.c index 6a3833e26045..1414c594c880 100644 --- a/usr.bin/calendar/day.c +++ b/usr.bin/calendar/day.c @@ -170,7 +170,7 @@ isnow(endp, monthp, dayp, varp) /* Easter or Easter depending days */ if (flags & F_EASTER) - day = v1; + day = v1 - 1; /* days since January 1 [0-365] */ /* * 1. {Weekday,Day} XYZ ... @@ -281,7 +281,7 @@ isnow(endp, monthp, dayp, varp) } #if DEBUG - fprintf(stderr, "day2: yday %d %d\n", day, tp->tm_yday); + fprintf(stderr, "day2: day %d yday %d\n", day, tp->tm_yday); #endif if (!(flags & F_EASTER)) { *monthp = month; @@ -292,7 +292,7 @@ isnow(endp, monthp, dayp, varp) for (v1 = 0; day > cumdays[v1]; v1++) ; *monthp = v1 - 1; - *dayp = day - cumdays[v1 - 1] - 1; + *dayp = day - cumdays[v1 - 1]; *varp = 1; }