Bug 15182 - "* Wed-1 event" in calendar produces "31 Nov* event" in mail
Summary: "* Wed-1 event" in calendar produces "31 Nov* event" in mail
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 3.3-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1999-11-30 10:30 UTC by Julian H. Stacey Jhs@jhs.muc.de Jhs
Modified: 2001-06-16 16:27 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Julian H. Stacey Jhs@jhs.muc.de Jhs 1999-11-30 10:30:02 UTC
	.calendar/calendar containing just 1 line:
		* Wed-1 MECC, Last Wednesday In Month
	calendar outputs
		Nov 31* MECC, Last Wednesday In Month

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 !
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 !
Comment 1 Mike Heffner freebsd_committer freebsd_triage 2001-06-16 16:27:06 UTC
State Changed
From-To: open->closed

Fixed in rev 1.12 of day.c.