Date: Wed, 6 Jun 2012 20:08 EDT From: Winston <wbe@psr.com> To: questions@freebsd.org Subject: bug in /usr/bin/calendar: "Thu+1" doesn't match on 7th or December Message-ID: <201206070008.q5708LAL009438@psr.com>
next in thread | raw e-mail | index | archive | help
Bug report for /usr/bin/calendar SUMMARY: calendar does not match "Thu+1" or "Mon+1" in some months. With one exception, it looks like calendar file dates such as "Thu+1" and "Mon+1" are failing to match in two cases: (1) the 7th of Jan-Nov, and (2) December. DETAILS/EXAMPLES: FreeBSD crystal 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC 2012 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 The bug occurs whether or not the command line options below are used. I first noticed it today (a Wednesday) because a Thu+1 event tomorrow was not in calendar's output. Example 1: Thu+1 ~/.calendar/calendar: Thu+1 foo (that's "Thu+1\tfoo\n" in C) foreach i ( 1 2 3 4 5 6 7 8 9 10 11 12 ) &calendar -t 1.$i.2011 -W 9 &end Jan 6* foo Feb 3* foo Mar 3* foo <----- Apr 7 absent May 5* foo Jun 2* foo <----- Jul 7 absent Aug 4* foo Sep 1* foo Oct 6* foo Nov 3* foo <----- Dec 1 absent foreach i ( 1 2 3 4 5 6 7 8 9 10 11 12 ) &calendar -t 1.$i.2012 -W 9 &end Jan 5* foo Feb 2* foo Mar 1* foo Apr 5* foo May 3* foo <----- Jun 7 absent Jul 5* foo Aug 2* foo Sep 6* foo Oct 4* foo Nov 1* foo <----- Dec 6 absent foreach i ( 1 2 3 4 5 6 7 8 9 10 11 12 ) &calendar -t 1.$i.2013 -W 9 &end Jan 3* foo <----- Feb 7 absent <----- Mar 7 absent Apr 4* foo May 2* foo Jun 6* foo Jul 4* foo Aug 1* foo Sep 5* foo Oct 3* foo <----- Nov 7 absent <----- Dec 5 absent Example 2: Mon+1 foo: Mon+1 foo ("Mon+1\tfoo\n") foreach i ( 1 2 3 4 5 6 7 8 9 10 11 12 ) &calendar -t 1.$i.2011 -W 9 -f foo &end Jan 3* foo <----- Feb 7 absent <----- Mar 7 absent Apr 4* foo May 2* foo Jun 6* foo Jul 4* foo Aug 1* foo Sep 5* foo Oct 3* foo <----- Nov 7 absent <----- Dec 5 absent foreach i ( 1 2 3 4 5 6 7 8 9 10 11 12 ) &calendar -t 1.$i.2012 -W 9 -f foo &end Jan 2* foo Feb 6* foo Mar 5* foo Apr 2* foo <----- May 3 absent <------- EXCEPTION! Jun 4* foo Jul 2* foo Aug 6* foo Sep 3* foo Oct 1* foo Nov 5* foo <----- Dec 3 absent foreach i ( 1 2 3 4 5 6 7 8 9 10 11 12 ) &calendar -t 1.$i.2013 -W 9 -f foo &end <----- Jan 7 absent Feb 4* foo Mar 4* foo Apr 1* foo May 6* foo Jun 3* foo Jul 1* foo Aug 5* foo Sep 2* foo <----- Oct 7 absent Nov 4* foo <----- Dec 2 absent HTH, -WBE
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206070008.q5708LAL009438>