I've been looking at different calendar-sharing formats lately to see which, if any, are most used by Rockville businesses and organizations. Existing calendar standards include
- iCalendar, which is a text-based (but not XML) format that is the basis for iCal, a format that can used to publish and allow saving of events in Microsoft Outlook and Mac iCalendar. Barnes and Noble publishes events in the iCal format for their Rockville and Gaithersburg stores, but they are published as individual .ics files (one per event), with no way I've found to grab multiple events at once.
- hCalendar, a representation of iCalendar in semantic HTML. hCalendar events can be directly embedded in web pages and styled with CSS. I didn't see any example of this being used in Rockville, but I did see it at the Boston University website.
Another option for making calendar data available is with an RSS feed, customized as needed, like the ones used by meetup.com. This is a sample calendar RSS file from the Green Home Meetup:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0"><channel>
<title><![CDATA[Events - Green Home Meetup Group]]></title>
<link><![CDATA[http://greenhome.meetup.com/101/calendar/]]></link>
<description><![CDATA[Events - Green Home Meetup Group]]></description>
<copyright>Copyright 2002-2006 Meetup, Inc.</copyright>
<lastBuildDate>Tue, 15 Jan 2008 20:31:29 EST</lastBuildDate>
<managingEditor>support@meetup.com (Meetup)</managingEditor>
<item>
<title><![CDATA[Meetup Get Together]]></title>
<guid isPermaLink="true">http://greenhome.meetup.com/101/calendar/7125041/</guid>
<description><![CDATA[<p>Green Home Meetups > Green Home Meetup Group</p> <p>Charlotte, NC 28217 - USA</p> <p>Sunday, February 3 at 3:00 PM</p> <p>Attending: 0</p> <p>Details: http://greenhome.meetup.com/101/calendar/7125041/</p> ]]></description>
<pubDate>Tue, 15 Jan 2008 20:31:29 EST</pubDate>
</item>
</channel></rss>
The Montgomery County Public Library system, bless their web developers' hearts, publishes an RSS feed like this for all library events at the Rockville and Twinbrook (and other county) libraries. Theirs is similar to the one displayed above, but has a very useful extra link field, for linking to a page with more information, and you can get information for any number of upcoming days -- you just specify the number you want in the URL. They do not include CDATA tags in their description fields though, and should do to make the file parsable. After adding CDATA tags, I was able to parse the library RSS files with a PHP script that writes them to a database for display in the Calendar.
It would be great if everyone (hello, Austin Grill, City of Rockville, Outta the Way Cafe, VisArts, REDI, Strathmore, Parilla, MTC, and all you other Rockville movers and shakers) offered either hCalendar or RSS feeds (for grabbing lots of events at once) and iCal files (for saving individual events to a personal calendar). hCalendar and RSS formats are straightforward to parse (except maybe for getting the date into a useable format) and make it easy to display the information in a browser without having to do much else to the data. The iCal format is more widely used by individuals and is more compact, though I don't know if you can include a link for more information with it (which you probably don't need in your personal calendar, but is useful in an aggregated online calendar). A sample of the compact iCal format:
BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 10.0 MIMEDIR//EN
VERSION:1.0
BEGIN: VEVENT
DTSTART:20080119T151500Z
DTEND:20080119T154500Z
SUMMARY;ENCODING=QUOTED-PRINTABLE:Storytime for 2's and 3's
DESCRIPTION;ENCODING=QUOTED-PRINTABLE:Stories and activities for ages 2-3 with an adult. Child must be at least 24 months old. No registration. This a repeat of the previous program.
LOCATION;ENCODING=QUOTED-PRINTABLE:Rockville-Children's Programming Room
UID:1020080119T151500Z
PRIORITY:3
END:VEVENT
END:VCALENDAR
If it isn't already obvious, I'd love to see more widespread use of calendar RSS feeds, as it would greatly simplify gathering and displaying calendar events throughout the area and let a wider audience find out easily what's going on in this great city of ours. I imagine more and more businesses and organizations will be doing this though, as they realize how much it is to their advantage to make descriptions of upcoming events easy to grab and save. Please let me know if yours is one of them!