From jhs@jhs.muc.de Tue Nov 30 02:29:21 1999
Return-Path: <jhs@jhs.muc.de>
Received: from slarti.muc.de (slarti.muc.de [193.149.48.10])
	by hub.freebsd.org (Postfix) with SMTP id D3D9915833
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 30 Nov 1999 02:29:20 -0800 (PST)
	(envelope-from jhs@jhs.muc.de)
Received: (qmail 27005 invoked from network); 30 Nov 1999 10:29:59 -0000
Received: from jhs.muc.de (193.149.49.84)
  by slarti.muc.de with SMTP; 30 Nov 1999 10:29:59 -0000
Received: (from jhs@localhost)
	by jhs.muc.de (8.9.3/8.9.3) id KAA41790;
	Tue, 30 Nov 1999 10:28:51 GMT
	(envelope-from jhs)
Message-Id: <199911301028.KAA41790@jhs.muc.de>
Date: Tue, 30 Nov 1999 10:28:51 GMT
From: jhs@freebsd.org
Sender: jhs@jhs.muc.de
Reply-To: jhs@freebsd.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: /usr/src/usr.bin/calendar Nov 31* from * Wed-1
X-Send-Pr-Version: 3.2

>Number:         15182
>Category:       bin
>Synopsis:       "* Wed-1 event" in calendar produces "31 Nov* event" in mail
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 30 02:30:02 PST 1999
>Closed-Date:    Sat Jun 16 08:27:06 PDT 2001
>Last-Modified:  Sat Jun 16 08:27:24 PDT 2001
>Originator:     Julian H. Stacey jhs@jhs.muc.de
>Release:        FreeBSD 3.3-RELEASE i386
>Organization:
>Environment:

>Description:
	.calendar/calendar containing just 1 line:
		* Wed-1 MECC, Last Wednesday In Month
	calendar outputs
		Nov 31* MECC, Last Wednesday In Month
 
>How-To-Repeat:

	Put in your ~/.calendar
		* Wed-1 There is no 31 Nov 1999, Wednesday is 1st December
	wind the clock back to 30 Nov 1999, run calendar.
	& get the same impossible date I did !

>Fix:
	
	I looked at 3.3/src/usr.bin/calendar/day.c:
	 int daytab[][14] = {
         { 0, -1, 30, 58, 89, 119, 150, 180, 211, 242, 272, 303, 333, 364 },
         { 0, -1, 30, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 },
	 };
	that 333 seems correct, so a fix is not as trivial as I hoped !



>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mikeh 
State-Changed-When: Sat Jun 16 08:27:06 PDT 2001 
State-Changed-Why:  
Fixed in rev 1.12 of day.c. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=15182 
>Unformatted:
