lilfluff: On of my RP characters, a mouse who happens to be a student librarian. (Default)
lilfluff ([personal profile] lilfluff) wrote2007-08-09 10:25 pm
Entry tags:

Birthday's and other events

One of the nifty things I've started playing with is a program called pcal. It takes a text file listing events and spits out by default a postscript file with a calendar of the current month. But the interesting thing is the flexibility of the event listing.

For instance here are simple entries:
All odd Fridays Payday!
All Thursdays T.H.E.M.

And here are some more interesting examples:
Weekday on_or_after Apr 15 Taxes Due!
Tue after first Mon in Nov Election today

And let's say THEM decides the third meeting of each month will be replaced by DDR night? That's simple enough to handle:
delete third Thursday in all T.H.E.M.
third Thursday in all Dance Dance Revolution Night

So it looks like I might actually start having and using a calendar. Which means I ought to put things on it. Sure I've got a few weekly and monthly meetings already in my calendar file, and it comes with a holiday file and moon phases files, but I'm sure there are things I ought to have in it.

So if there are any dates you think I should track just hit reply. Birthdays, upcoming events (I think I might start a calendar file for book release dates), anniversaries of important events, or anything of interest.

[identity profile] pentomino.livejournal.com 2007-08-10 02:55 pm (UTC)(link)
OK, mr. calendar genius... can it figure out Easter or any of those floating Jewish holidays?

[identity profile] lilfluff.livejournal.com 2007-08-11 03:50 am (UTC)(link)
You know, I recalled that Easter had some complicated rules regarding when it occured, but whoa Complicated with a capital C. Fortunately it looks like Easter (including the Orthodox church's different rules) is one of the predefined events. Those being Easter, Christmas, Thanksgiving, Good Friday, St. George's and Marcus's days, and Friday the 13ths. There is also a pre-processor function that allows you to define your own keywords. The example in the manual is defining Semester_Start as 8/13 and then using it to add a 1st Quiz and 2nd Quiz to the calendar on the basis of how many days it's been since the semester started.

So if you can define a holiday on the basis of something like, "First Monday following " or "Sunday on_or_before " then it should be possible to make a rule for it.

I'm not certain if pcal can handle the Jewish holidays on its own since it's designed for the Gregorian calendar. But with the right calendar formulas one ought to be able to do up a a script file to calculate when in the Gregorian calendar various key events (solstices, starts of months on other calendars, etc) occur and then use the preprocessor to define those dates to use in pcal rules. Or since pcal simply reads in a text file you point it at there's no reason you couldn't have that script simply figure out or look up the date of an event with a more complicated rule and then simply write into one of the calendar files, "8/21* Fizzbol Day" (the "*" tells pcal to consider it a holiday). That's the nice thing about open formats like that, makes it easy to plug different things together to get a better result.