A few weeks ago, I was complaining about the lack of a good Open Source library for both parsing AND making use of the vcal/ical internet calendar feed format. Quite a few solutions exist for simple parsing but few (okay, zero that I could find) solid, robust solutions exist for doing anything intelligible with the data once parsed — specifically, expanding out the various types of recurrences and canceling out occurrence exceptions.
Last week, a potential solution just dropped right into my lap. For some reason that I do not remember I was looking at Dashcode, Apple’s tool for writing and debugging JavaScript-based widgets. It is actually a well-crafted tool, I have just never had a need for it. It turns out that one of the premade application templates is for displaying upcoming calendar events from a published iCal feed. The parser not not only handles one-time events, but repeating ones. It is written in JavaScript and makes good use of object-oriented techniques, including objects for the calendar, event, timezones, recurring rules, and the file parser. Previously, writing a full parser and calendar engine was a little beyond the scope of the project that called for a calendar feed. Now, it looks like it might be just a simple translation of JavaScript to Objective-C (plus some unit tests to catch possible transcription errors).