bug in /usr/bin/calendar: "Thu+1" doesn't match on 7th or December
- From: Winston <wbe@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 06 Jun 2012 20:30:07 -0400
If you use /usr/bin/calendar with dates such as "Thu+1", beware that
they don't always work. The problem exists in FreeBSD 9.0-RELEASE, but
I wouldn't be surprised if this problem exists in earlier versions, too.
The bug: calendar does not match date expressions such as "Thu+1" or
"Mon+1" in some months. The failures mostly fall into two cases:
(1) the seventh of January - November, and
(2) December.
I have not checked other cases such as +2, +3, etc.
[I filed a bug report with details. Unfortunately, I don't have time at
the moment to download the source code and go through it.]
Here's an example:
~/.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.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
Similar results are obtained for 2011, 2012, and "Mon+1", but there may
be other cases, too, since "Mon+1" didn't match May 3, 2012.
Just thought you'd want to know since so many people use calendar,
-WBE
.
- Prev by Date: Re: zfs and snapshots
- Next by Date: Largest Filesystem on FBSD 8?
- Previous by thread: zfs and snapshots
- Next by thread: Largest Filesystem on FBSD 8?
- Index(es):
Relevant Pages
|