Subject: Re: calendar(1) extension... RFC
To: Mason Loring Bliss <>
From: Greg A. Woods <>
List: tech-userlevel
Date: 11/18/2002 13:47:21
[ On Sunday, November 17, 2002 at 01:45:08 (-0500), Mason Loring Bliss wrote: ]
> Subject: calendar(1) extension... RFC
> What do you folks think about this? It's a trivially small amount of code
> that makes calendar(1) truly useful, as opposed to fairly marginal in
> utility.

I would like to extend calendar to handle more styles of date
specifications too:

# Any of DAY, MONTH, or MONTHNAME, YEAR can be `*' which matches any
# day, month, or year, respectively.
# Names can be capitalized or not, written in full, or abbreviated to
# three characters with or without a period.

And of course it should also ignore lines starting with '# ' (comments! :-)
(which with the whitespace can be fairly easily used in conjunction with
CPP-like constructs such as the '#include')

> To summarize the change, this adds a flag, '-x', that extends calendar(1)'s
> syntax a bit, allowing the processing of calendar file lines like this:
> 07/01 +15@1962 Matt

I think this would be much better written as:

1962/07/01	+15 message to display %y years ago

I.e. specify the starting date of the anniversary and then allow
something like '%y' to expand to the delta in years (and maybe also have
other '%' expansions that make sense for anniversaries too).

> The +foo and @bar markers can be placed anywhere in the string, in any
> order, and they don't have to be adjacent. If they are preceded by a space
> character, this is omitted from the final output along with the markers
> themselves.

I think the '+N' trigger should always/only be at the beginning --
i.e. the first thing after the date.

With the changes I propose I could make calendar and my emacs diary file
compatible, which would help me a lot too.

On the other hand there's always pkgsrc/time/cal (and 'remind')....  :-)

								Greg A. Woods

+1 416 218-0098;            <>;           <>
Planix, Inc. <>; VE3TCP; Secrets of the Weird <>