Carnival Sunday in Brazil
Dave Rolsky
autarch at urth.org
Mon Sep 22 15:18:57 UTC 2008
On Mon, 22 Sep 2008, Olson, Arthur David (NIH/NCI) [E] wrote:
> Another possibility is to express the rules as...
> Rule Brazil 2008 max earlycarnival Feb Sun>=15 0:00 0 -
> Rule Brazil 2008 max latecarnival Feb Sun>=22 0:00 0 -
> ...with suitable additions to the "yearistype" script--including, but not limited to,
> 2-earlycarnival|2-latecarnival)
> case $1 in
> 2012|2015|2023|2026|2034|2037) late=1 ;;
> *) late=0 ;;
> esac
> case $2-$late in
> earlycarnival-0|latecarnival-1) exit 0 ;;
> *) exit 1 ;;
> esac ;;
Arg, please don't!
Those of us who write our own parsers will thank you for not changing the
format with weird little special cases ;)
> Yet another possibility is to cobble up a Carnival calculating
> executable that can be used by yearistype (instead of hard-coding the
> years as above). Both this approach and the hard-coded approach merit
> caution: the yearistype mechanism hasn't been used for real-world stuff
> in some years.
This is even worse for those of us with our own parsers.
I really would like to see the tz file format remain something
self-contained. Ideally, it'd be documented outside of the C code that
parses it. Even more ideally, it'd remain as simple as possible.
-dave
/*==========================
VegGuide.Org
Your guide to all that's veg
==========================*/
More information about the tz
mailing list