Hi Andy, I just ran into this regression and wrote a similar patch (though I missed the WEEKLY test).
Thanks for the fix! It solves the Easter-calculation problem I noticed. For anyone looking for a quick test, none of the pre- or post-Easter dates will be displayed when executing: calendar -t 20160101 -A 180 -f /usr/share/calendar/calendar.christian After Andy's patch it resolves the issue. --Aaron * Andy Bradford <amb-open...@bradfords.org> [2016-08-31 07:52:19 -0600]: > Hello, > > While writing a set of regression tests for calendar(1) I discovered a > bug introduced by my last patch. The following patch fixes that and all > regression tests in the attachment of tests passes. > > Thanks, > > Andy > > Index: day.c > =================================================================== > RCS file: /home/cvs/src/usr.bin/calendar/day.c,v > retrieving revision 1.33 > diff -u -p -r1.33 day.c > --- day.c 13 Jul 2016 21:32:01 -0000 1.33 > +++ day.c 31 Aug 2016 13:40:01 -0000 > @@ -543,7 +543,9 @@ isnow(char *endp, int bodun) > tdiff = difftime(ttmp, f_time)/ SECSPERDAY; > if (tdiff <= offset + f_dayAfter || > (bodun && tdiff == -1)) { > - if ((tmtmp.tm_mon == month) && > + if (((tmtmp.tm_mon == month) || > + (flags & F_SPECIAL) || > + (interval == WEEKLY)) && > (tdiff >= 0 || > (bodun && tdiff == -1))) { > if ((tmp = malloc(sizeof(struct > match))) == NULL) >