Subject: Re: calendar diffs, et. al.
To: Mason Loring Bliss <mason@acheron.middleboro.ma.us>
From: Ty Sarna <tsarna@endicor.com>
List: current-users
Date: 05/12/1998 10:50:46
Mason Loring Bliss wrote:
> I'll add in a command-line switch to disable any and all funky processing...
> I guess in future, if multiple options are added, the "extension disable"
> switch could act like some of the others, itself taking an argument that
> describes which options to disable.

Well, I don't want to disable them so much as override them. The idea of
the lookahead command line switches was to be able to find _only_ events
occuring on a given day (imagine the day view in a calendar program) or
to show the upcoming week's activities.

Howabout -l specifies the default lookahead for entries that don't have
their own, and -L specifies an override lookahead? I don't know if -w
needs a similar -W, or if maybe -w should just apply to whichever of -L
or -l was given.

> Yeah. I think that could be addressed with the extension format I'm
> pondering... I'll give it some thought, knock off an initial implementation,

How about requiring any extended date spec to be in {} brackets or
somesuch?

Look through the distributed calendar files before deciding on a syntax.
It ought to be able to handle all the moving dates in those, and some of
them are pretty tricky (Easter-relative, etc!).

Maybe something like this ([] indicating optional parts, <token> in <>'s):

{<date>[/<lookahead>]}

whwre <lookahead> is an integer, and <date> is either:

<nth>-<dayofweek>[-<month>]  (eg 3rd monday in march is 3-Mon-Mar) 

	<nth>:		integer
	<dayofweek>:	accept common abreviations and numbers
	<month>:	ditto

or:

<special>[<plusneg><integer>]

	<special>:	"easter", "rosh_hashanah", etc (probably simpler
			to just build these algorithms into calendar
			than to try to make the syntax expressive
			enough to handle them. 

	<plusneg>:	+ or -

This good friday is {easter-2}, etc.

Then there's optioanl year handling, and stuff like US Election Day that
isonly in even years...  the more I look at the example calendar files,
the more complicated this gets! Maybe this is going in the wrong
direction -- just handle the common stuff, and have a separate script to
generate a calendar file with nailed-down dates for the holidays in a
given year?

> I'll write back when I have something. If I manage to come up with some-
> thing acceptably good, what's the procedure for submitting my changes for
> consideration?

send-pr?