From owner-freebsd-questions@FreeBSD.ORG Thu Jun 7 00:28:08 2012 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFB98106564A for ; Thu, 7 Jun 2012 00:28:08 +0000 (UTC) (envelope-from wbe@psr.com) Received: from smtp1.sccoast.net (smtp1.sccoast.net [66.153.203.168]) by mx1.freebsd.org (Postfix) with ESMTP id 75FBC8FC17 for ; Thu, 7 Jun 2012 00:28:08 +0000 (UTC) Received: from mail.psr.com ([67.212.42.216]:20318 helo=psr.com) by smtp1.sccoast.net with esmtp (Exim 4.76) (envelope-from ) id 1ScQH8-0003Oy-R3 for questions@freebsd.org; Wed, 06 Jun 2012 20:08:30 -0400 Received: (from wbe@localhost) by psr.com (8.14.5/8.14.5/Submit) id q5708LAL009438; Wed, 6 Jun 2012 20:08:21 -0400 (EDT) (envelope-from wbe) Message-Id: <201206070008.q5708LAL009438@psr.com> Date: Wed, 6 Jun 2012 20:08 EDT From: Winston To: questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=fixed Cc: Subject: bug in /usr/bin/calendar: "Thu+1" doesn't match on 7th or December X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2012 00:28:08 -0000 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