Introduction
iCalendar is the standard text format for calendar data: events, to-do items and free
or busy times. It was first published as RFC 2445 in 1998 and is now RFC 5545. Meeting
invitations sent by email carry an .ics attachment, and calendar
subscriptions, such as a sports fixture list or a public holiday feed, are
.ics files fetched from a web address. It grew out of the older
vCalendar format.
Structure
The file is UTF-8 text made of content lines, each
NAME;PARAMETER=value:value, ending in a carriage return and line feed.
Lines longer than 75 bytes are folded: the rest continues on the next line, which starts
with a space.
Lines are grouped into components between BEGIN: and END:
lines. The whole file is one VCALENDAR, which starts with
VERSION:2.0 and a PRODID naming the program that made it.
Inside are VEVENT, VTODO, VJOURNAL and
VFREEBUSY components, VTIMEZONE definitions, and
VALARM reminders nested in events. An event has a UID, a
DTSTART, usually a DTEND or DURATION, a
SUMMARY, and an optional RRULE for repeats. The
components and properties and
values and parameters pages give every
component, property, value type and parameter.
0BEGIN:VCALENDAR with VERSION and PRODIDlines…VTIMEZONE time zone rulesoptional…VEVENT or VTODO with its properties and alarmsrepeated
…END:VCALENDAR1 line
Not described
The pages follow RFCs 5545, 5546 (with a scheduling page for its per-method rules), 6868, 7529, 7986, 9073 and 9074, and an extensions page covers RFC 7953 (availability), RFC 6638 (scheduling parameters) and RFC 7808 (time zone data properties). The XML and JSON forms, xCal (RFC 6321) and jCal (RFC 7265), have pages of their own.
Known, not yet covered
- Viewer: the components, properties, value types and parameters of RFC 5545 and RFC 7986 are read and checked, recurrence rules are expanded with RFC 5545's algorithm (and RFC 7529's SKIP for the Gregorian calendar), and a time zone is applied from the file's own VTIMEZONE. The file is read in windows, a component at a time (an event, to-do, journal entry or free/busy component is checked as it ends and read again from its offsets when shown), so a file of any size opens. Also read and checked: the components PARTICIPANT, VLOCATION and VRESOURCE and the properties and parameters of RFC 9073 (STYLED-DESCRIPTION, STRUCTURED-DATA, PARTICIPANT-TYPE, RESOURCE-TYPE, LOCATION-TYPE, CALENDAR-ADDRESS, ORDER, SCHEMA, DERIVED), VAVAILABILITY, AVAILABLE and BUSYTYPE of RFC 7953, and SCHEDULE-AGENT, SCHEDULE-FORCE-SEND and SCHEDULE-STATUS of RFC 6638 (checked inside one component and against other components of the file that spell the parameter out); and RECURRENCE-ID with RANGE=THISANDFUTURE replaces its instance and every later one in the Repeats tab. A TZID with no VTIMEZONE is read with the IANA time zone of that name when it is one (the offset comes from the IANA time zone database through the Intl.DateTimeFormat of the program that opened the file, which the text says; the file does not carry it, and the missing VTIMEZONE is still a Conformance problem). xCal (RFC 6321) and jCal (RFC 7265) are not variants of this format: they are the same data in XML and JSON, with their own media types (application/calendar+xml, application/calendar+json) and files, so under the site’s rule that different formats are separate formats (CONVENTIONS item 2) each has its own pages and viewer, and each of those viewers converts the file to iCalendar text and shows it in this viewer’s tabs. Not covered: RSCALE calendars other than GREGORIAN (stated, not expanded), the per-method rules of iTIP (RFC 5546), the sub-component rules of RFC 9074 (VALARM extensions), the relation between a VAVAILABILITY and free/busy time (the busy-time arithmetic of RFC 7953 sections 4 and 5), and a time zone of a name the runtime’s IANA database does not have (reported, not converted). A time zone the runtime’s IANA copy spells differently from the calendar’s author may give a different offset. Lists of dates stop at 50,000 for one component, at the year 9999, and at 400,000 for one file; each stop is stated in the Repeats tab, and every component stays reachable in the Components tab and the tree.
Unknown
- Reference: the WebDAV side of RFC 6638 (inbox and outbox collections, privileges, HTTP headers) and the HTTP actions and JSON of the RFC 7808 service are protocols around the format, not part of it, and are not described.
Links
Software
- Google Calendar – imports .ics files and subscribes to calendar feeds (web, Android, iOS)
- Microsoft Outlook – opens meeting invitations and imports calendars (Windows, macOS, web)
- Apple Calendar – the built-in calendar on Apple devices (macOS, iOS)
- Mozilla Thunderbird – free email program with a built-in calendar (Windows, macOS, Linux)
Developers
Reference
- RFC 5545 – Internet Calendaring and Scheduling Core Object Specification, the iCalendar standard