NetBSD Problem Report #135

From gnats  Mon Feb 21 06:11:22 1994
Received: from csi0.csi.uottawa.ca (csi0.csi.uottawa.ca [137.122.24.51]) by sun-lamp.cs.berkeley.edu (8.6.5/8.6.5) with SMTP id GAA27488 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Mon, 21 Feb 1994 06:11:21 -0800
Message-Id: <9402211411.AA10912@csi0.csi.uottawa.ca>
Date: Mon, 21 Feb 1994 09:11:15 -0500 (EST)
From: Keith White <kwhite@csi.uottawa.ca>
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: calendar bug
X-Send-Pr-Version: 3.2

>Number:         135
>Category:       bin
>Synopsis:       calendar entries with weekday names don't work properly
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 21 06:20:02 +0000 1994
>Closed-Date:    Tue Feb 22 09:46:41 +0000 1994
>Last-Modified:  
>Originator:     Keith White
>Release:        
>Organization:
Keith White, Department of Computer Science, University of Ottawa
kwhite@csi.uottawa.ca [+1 613 564 5455]
>Environment:
System: NetBSD infox 0.9a INFOX#0 i386


>Description:
The calendar man page claims that you can have calendar entries
that begin with weekday names.  This is not true.  It certainly
*appears* that the code is making an attempt to "do the right
thing"; however, entries like

Sunday	last day of the weekend...

will only be displayed on the 1st day of the month (which may or
may not be a Sunday).  The following patch fixes this behaviour.
>How-To-Repeat:
>Fix:

% ident `which calendar`
/usr/bin/calendar:
     $Id: calendar.c,v 1.3 1994/01/05 13:13:00 cgd Exp $

*** calendar.c.orig	Sun Feb 20 21:09:58 1994
--- calendar.c	Sun Feb 20 21:38:38 1994
***************
*** 209,214 ****
--- 209,216 ----
  			day = v2 ? v2 : 1;
  		}
  	}
+ 	if (flags&F_ISDAY)
+ 		day = tp->tm_mday + (((day - 1) - tp->tm_wday + 7) % 7);
  	day = cumdays[month] + day;

  	/* if today or today + offset days */
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: cgd 
State-Changed-When: Tue Feb 22 01:46:41 PST 1994 
State-Changed-Why:  
fixed, along with a related bug, and fixes sent (along with previous) to 
bostic. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.