iCal missing holidays

Hi all,
iCal comes without a regional-based statutory holiday, moon, and a names calendar. Usually, online iCal calendars are put together by hand and done only in one occasion, because too hard, to laborious to arrange over and over again.
A online calendar database would be the solution, combined with applescript. The idea follows me already for some time now. Any suggestions?

A subscription?
Or here?

In the UK at least, all the usual public holidays except for Easter can be handled by recurring events which don’t need to be updated from year to year.

Our three non-festival bank holidays can be set either in Calendar’s GUI or by scripting the events’ ‘recurrence’ rules to the following values:

Early May B/H (first Monday in May):
“FREQ=YEARLY;INTERVAL=1;BYMONTH=5;BYDAY=1MO”

Spring B/H (last Monday in May):
“FREQ=YEARLY;INTERVAL=1;BYMONTH=5;BYDAY=-1MO”

August (Summer) B/H (last Monday in August):
“FREQ=YEARLY;INTERVAL=1;BYMONTH=8;BYDAY=-1MO”

(Similar rules can be used to mark the dates when the clocks go forward and back.)

The Christmas Day, Boxing Day, and New Year holidays fall on the days themselves except when these occur at weekends, in which case the holidays are deferred to the immediately following Mondays (or usually the Tuesdays with Boxing Day). Each of these holidays needs two or three recurring events, which Calendar will express in different years according to the circumstances:

Christmas Day B/H:
Expressed when 25th December falls on Monday-Friday: “FREQ=YEARLY;INTERVAL=1;BYMONTH=12;BYMONTHDAY=25;BYDAY=MO,TU,WE,TH,FR”
Expressed when 26th or 27th December is a Monday (ie. the 25th falls on a Saturday or Sunday): “FREQ=YEARLY;INTERVAL=1;BYMONTH=12;BYMONTHDAY=26,27;BYDAY=MO”

Boxing Day B/H:
Expressed when 26th December falls on Tuesday-Friday: “FREQ=YEARLY;INTERVAL=1;BYMONTH=12;BYMONTHDAY=26;BYDAY=TU,WE,TH,FR”
Expressed when 28th December is a Monday (the 26th falls on a Saturday): “FREQ=YEARLY;INTERVAL=1;BYMONTH=12;BYMONTHDAY=28;BYDAY=MO”
Expressed when 27th or 28th December is a Tuesday (the 26th falls on a Sunday or Monday): “FREQ=YEARLY;INTERVAL=1;BYMONTH=12;BYMONTHDAY=27,28;BYDAY=TU”

New Year’s Day B/H:
Expressed when 1st January falls on Monday-Friday: “FREQ=YEARLY;INTERVAL=1;BYMONTH=1;BYMONTHDAY=1;BYDAY=MO,TU,WE,TH,FR”
Expressed when 2nd or 3rd January is a Monday (the 1st falls on a Saturday or Sunday): “FREQ=YEARLY;INTERVAL=1;BYMONTH=1;BYMONTHDAY=2,3;BYDAY=MO”

The iCalendar standard allows for events with multiple recurrence rules, which would have been great here. But Calendar no longer observes multiple rules written into an .ics file, so it’s necessary to use multiple events instead.

There are other ways to write some of the above rules, but I don’t know what implications are for efficiency. For instance, days of the year could be specified instead of months and days thereof:

New Year’s Day B/H:
Expressed when 1st January falls on Monday-Friday: “FREQ=YEARLY;INTERVAL=1;BYYEARDAY=1;BYDAY=MO,TU,WE,TH,FR”
Expressed when 2nd or 3rd January is a Monday (the 1st falls on a Saturday or Sunday): “FREQ=YEARLY;INTERVAL=1;BYYEARDAY=2,3;BYDAY=MO”

For Easter, I’m afraid it seems to be necessary to create individual events for each year. This could be done with a script incorporating a method for calculating Easter Day for any particular year.

Hi Joy,

Moon and Sun calendars can be calculated and are more accurate if done right, in my experience.

Edited: note that you cannot calculate how humans divide the earth into time zones. When you’re working on time zones, see Nigel Garvey’s posts on time zones (and others) it gets pretty complicated.

gl,
kel