This page follows sections 1 to 5 of the Versit vCalendar 1.0 specification (18 September 1996), read 2026-11-13 from the Word copy (vcal-10.doc, converted with the system text converter) and the damaged plain-text copy once at imc.org, for the sections where the two agree. The properties, alarms and recurrence rules are on the properties page; section 6 of the specification, the extended recurrence grammar copied from the XAPIA CSA specification, is reference material for that.
What a vCalendar is
A format for exchanging the event (a scheduled amount of time on a calendar) and to-do (an action item or assignment) entities of calendar and scheduling programs, independent of how it is transported: a file, a point-to-point link, a network or a wireless link. A vCalendar is a data stream of one or more vCalendar objects, each identifiable and parseable within the stream. Conceptually a writer creates streams and a reader interprets them; the specification defines only the format. It is a clear-text encoding made to work where only 7-bit transfer, short lines and low bandwidth are available, and simple enough for small devices such as personal digital assistants, mobile phones and pagers. Date and time values follow ISO 8601. Unlike a CSV or tab-delimited export it keeps the meaning of the original objects. Its model came from the X.400 API Association's Calendaring and Scheduling API.
Object model
- vCalendar object: begins with
BEGIN:VCALENDARas the first characters of the stream or of a line, ends withEND:VCALENDARas the first characters of a line, and contains the calendar properties then any number of event and to-do entities. A stream can hold several objects. - vEvent: between
BEGIN:VEVENTandEND:VEVENT, each at the start of a line. vTodo:BEGIN:VTODOandEND:VTODO. Neither may be nested inside the other or inside itself; relations between them are expressed with theRELATED-TOproperty. - Order: the calendar properties (
VERSIONis required, thenPRODID,TZ,DAYLIGHT,GEO) come afterBEGIN:VCALENDARand before the first entity, and apply to the whole object unless overridden inside an entity.
Line syntax
- Property: one or more lines of the form
PropertyName [";" PropertyParameters] ":" PropertyValue, for exampleDTSTART:19960415T083000. The name is one of the defined strings (or an extension), must be the first characters of a line, and names and parameters are case-insensitive. Values are strings. - Parameters follow the name after a semicolon, written
name=valueor, where the value is unambiguous, as the value alone. The full formDESCRIPTION;ENCODING=QUOTED-PRINTABLE:...has the short formDESCRIPTION;QUOTED-PRINTABLE:.... A semicolon inside a parameter value is escaped with a backslash. The grammar names these parameters:TYPE,VALUE,ENCODING,CHARSET,LANGUAGE,ROLE,STATUSandX-names. - Lines end with CR LF (RFC 822). A long line can be folded by inserting CR LF followed by at least one white space character wherever linear white space may occur; unfolding treats CR LF plus a white space character as that white space character. Folding should be done at higher-level breaks of structured values.
- Line breaks inside a value are also CR LF, which would end the line, so such values must use quoted-printable or base64: in quoted-printable a line break is
=0D=0Aand a soft line break is a trailing=, with lines under 76 characters. Example:DESCRIPTION;ENCODING=QUOTED-PRINTABLE:Project XYZ Final Review=0D=0A=then a continuation line of leading white space,Conference Room - 3B=0D=0A=,Come Prepared. - Compound values have components separated by a semicolon; a semicolon inside a component is escaped with a backslash.
Encodings, character set, language, times and locations
- Encoding. The default for the object is 7-bit; the
ENCODINGparameter (any property) can sayBASE64,QUOTED-PRINTABLEor8-bitfor one value. A transport such as MIME mail may carry its own encoding at the wrapper level for a stream whose default is 8-bit. - Character set. The default is ASCII;
CHARSET(any property, though it makes no sense on some) names an IANA-registered set, for exampleDESCRIPTION;CHARSET=ISO-8859-8:.... A transport wrapper may carry a default charset such as UTF-8. - Language. The default is
en-US;LANGUAGEtakes an RFC 1766 tag, for exampleSUMMARY;LANGUAGE=fr-CA:.... It makes no sense onPHOTO,LOGO,SOUNDorTEL. - Date and time. ISO 8601 combined representation, basic or extended format; UTC should be used whenever possible. Basic complete form:
<year><month><day>T<hour><minute><second><designator>, local19960415T083000, UTC withZ19960415T083000Z. A list of dates and times is separated by semicolons:19960101T090000Z; 19960201T090000Z; .... - Duration. ISO 8601 basic:
P, optional yearsY, monthsM, weeksW, daysD, then optionalTwith hoursH, minutesM, secondsS:P6W,PT15M,PT1H30M,P2Y10M15DT10H30M20S. - Value location. By default a value is
INLINE.VALUE=URLmeans the value is a URL of the resource;VALUE=CONTENT-ID(shortCID) means it is the Content-ID of another MIME part of the message that carries the vCalendar. It makes no sense onVERSION,TZ,STATUS,PRIORITY,MALARMand the like. Example:ATTACH;VALUE=URL:http://www.abc.com/dir_photos/my_photo.gif. - Binary values (images, audio, video): by URL, by Content-ID, or inline after base64 (the default) or quoted-printable encoding.
- Extensions. Property or parameter names starting
X-, preferably followed by a vendor identifier (X-ABC-MMSUBJ;TYPE=WAV; VALUE=URL: http://load.noise.org/mysubj.wav). There is no registry of names. Readers must be able to parse extensions but may ignore them.
Formal grammar
The specification's BNF (RFC 822 style), complete and in the specification's order, which it calls the definitive reference. It
references only this subset of RFC 822 literals: CR (ASCII 13), LF (ASCII 10), CRLF = CR LF,
SPACE (ASCII 32) and HTAB (ASCII 9). All literal property names are valid as upper, lower or mixed case. Note that it writes the entity delimiters as
"EVENT" and "TODO", while the prose and every example use VEVENT and VTODO; files use VEVENT and VTODO.
ws = 1*(SPACE / HTAB) ; whitespace, one or more spaces or tabs
wsls = 1*(SPACE / HTAB / CRLF) ; whitespace with line separators
value = 7bit / 8bit / quoted-printable / base64
; The value must be in the encoding type specified for the property value.
7bit = <7bit us-ascii printable chars, excluding CR LF>
8bit = <MIME RFC 1521 8-bit text>
quoted-printable = <MIME RFC 1521 quoted-printable text>
base64 = <MIME RFC 1521 base64 text>
; the end of the text is marked with two CRLF sequences
; this results in one blank line before the start of the next
; property
groups = groups "." word / word
word = <any printable 7bit us-ascii except []=:., >
vcal_file = [wsls] vcal [wsls]
vcal = "BEGIN" [ws] ":" [ws] "VCALENDAR" [ws] 1*CRLF
calprop calentities [ws] *CRLF
"END" [ws] ":" [ws] "VCALENDAR" [ws] 1*CRLF
calentities = calentities *CRLF calentity
/ calentity
calentity = evententity
/ todoentity
evententity = "BEGIN" [ws] ":" [ws] "EVENT" [ws] 1*CRLF
entprops [ws] *CRLF
"END" [ws] ":" [ws] "EVENT" [ws] 1*CRLF
todoentity = "BEGIN" [ws] ":" [ws] "TODO" [ws] 1*CRLF
entprops [ws] *CRLF
"END" [ws] ":" [ws] "TODO" [ws] 1*CRLF
calprops = calprops *CRLF calprop
/ calprop
calprop = "DAYLIGHT" [params] ":" value CRLF
/ "GEO" [params] ":" value CRLF
/ "PRODID" [params] ":" value CRLF
/ "TZ" [params] ":" value CRLF
/ "VERSION" [params] ":" "1.0" CRLF
; The VERSION calendar property MUST appear in the vCalendar object.
entprops = entprops *CRLF entprop
/ entprop
entprop = [ws] simprop [params] ":" value CRLF
/ [ws] "AALARM" [params] ":" aalarmparts CRLF
/ [ws] "CATEGORIES" [params] ":" 1*catvals CRLF
/ [ws] "CLASS" [params] ":" classvals CRLF
/ [ws] "DALARM" [params] ":" dalarmparts CRLF
/ [ws] "EXDATE" [params] ":" xdatevals CRLF
/ [ws] "MALARM" [params] ":" malarmparts CRLF
/ [ws] "PALARM" [params] ":" palarmparts CRLF
/ [ws] "RDATE" [params] ":" rdatevals CRLF
/ [ws] "RESOURCES" [params] ":" 1*resvals CRLF
/ [ws] "STATUS" [params] ":" statvals CRLF
simprop = "ATTACH" / "ATTENDEE" / "DCREATED" / "COMPLETED"
/ "DESCRIPTION" / "DUE" / "DTEND" / EXRULE / LAST-MODIFIED
/ "LOCATION" / "RNUM" / "PRIORITY" / "RELATED-TO" / "RRULE"
/ "SEQUENCE" / "DTSTART" / "SUMMARY" / "TRANSP" / "URL"
/ "UID" / "X-" word
; EXRULE and LAST-MODIFIED are unquoted in the specification
aalarmparts = 0*3(strnosemi ";") strnosemi
; runTime, snoozeTime, repeatCount, audioContent
catvals = "APPOINTMENT" / "BUSINESS" / "EDUCATION" / "HOLIDAY" / "MEETING" / "MISCELLANEOUS"
/ "PERSONAL" / "PHONE CALL" / "SICK DAY" / "SPECIAL OCCASION" / "TRAVEL" / "VACATION" / "X-" word / value
classvals = "PUBLIC" / "PRIVATE" / "CONFIDENTIAL" / "X-" word / value
dalarmparts = 0*3(strnosemi ";") strnosemi
; runTime, snoozeTime, repeatCount, displayString
xdatevals = 1*value
; One or more date/time values
malarmparts = 0*4(strnosemi ";") strnosemi
; runTime, snoozeTime, repeatCount, addressString, noteString
palarmparts = 0*3(strnosemi ";") strnosemi
; runTime, snoozeTime, repeatCount, procedureName
rdatevals = 1*value
; One or more date/time values
resvals = "CATERING" / "CHAIRS" / "EASEL" / "PROJECTOR" / "VCR" / "VEHICLE" / "X-" word / value
statvals = "ACCEPTED" / "NEEDS ACTION" / "SENT" / "TENTATIVE" / "CONFIRMED" / "DECLINED"
/ "COMPLETED" / "DELEGATED" / "X-" word / value
params = ";" [ws] paramlist
paramlist = paramlist [ws] ";" [ws] param
/ param
param = "TYPE" [ws] "=" [ws] ptypeval
/ ["VALUE" [ws] "=" [ws]] pvalueval
/ ["ENCODING" [ws] "=" [ws]] pencodingval
/ "CHARSET" [ws] "=" [ws] charsetval
/ "LANGUAGE" [ws] "=" [ws] langval
/ "ROLE" [ws] "=" [ws] roleval
/ "STATUS" [ws] "=" [ws] statuval
/ "X-" word [ws] "=" [ws] word
/ knowntype
; "statuval" is spelled so here, but the rule below is "statusval"
ptypeval = knowntype / "X-" word
knowntype = "WAVE" / "PCM" / "VCARD" / "X-" word / value
pvalueval = "INLINE" / "URL" / "CONTENT-ID" / "CID" / "X-" word
pencodingval = "7BIT" / "8BIT" / "QUOTED-PRINTABLE" / "BASE64" / "X-" word
charsetval = <a character set string as defined in Section 7.1 of RFC 1521>
langval = <a language string as defined in RFC 1766>
roleval = "ATTENDEE" / "ORGANIZER" / "OWNER" / "X-" word
; the specification's grammar omits "DELEGATE", which its ROLE table
; and examples define: accept it (see Properties, Value meanings)
statusval = "ACCEPTED" / "NEEDS ACTION" / "SENT" / "TENTATIVE" / "CONFIRMED"
/ "DECLINED" / "COMPLETED" / "DELEGATED" / "X-" word
strnosemi = *(*nonsemi ("\;" / "\" CRLF)) *nonsemi
; To include a semicolon in this string, it must be escaped
; with a "\" character.
nonsemi = <any non-control ASCII except ";">
The rule groups = groups "." word / word is in the Word copy too, but no property rule uses it. The vcal rule uses calprop and calentities, so calprops and entprops (the repeating forms) are defined as given. The alarm
values have 0 to 3 (audio, display, procedure) or 0 to 4 (mail) semicolon-separated parts after the run time, snooze time and repeat count, each part a string without
unescaped semicolons.
Transport recommendations
Email (SMTP and MIME)
- As text in a message body. A vCalendar can simply be pasted into an RFC 822 message body after a human-readable introduction; this works with any mail system but gives none of MIME's benefits.
- As a
text/plainpart. Amultipart/mixedmessage with a text part and a second partContent-Type: text/plain; charset=us-ascii; name="MARTIN.VCS"holding the vCalendar works with current MIME user agents. - As
text/x-vCalendar(a non-standard type, spelledtext/x-vCalendar):Content-Type: text/x-vCalendar; charset=us-ascii; name="MARTIN.VCS"; this identifies the vCalendar clearly in the message. One object can hold both an event and a to-do.
Web (HTTP and HTML)
A server delivers a vCalendar with Content-Type: text/x-vCalendar (for example GET martin.vcs answers 200 OK with that content type and the
object in the body). A page can embed it with the HTML 3.2 OBJECT element, <object data=martin.vcs type="text/x-vCalendar">, with fallback text linking to the file.
Desktop (file system, clipboard, drag and drop)
- File system. Support import and export through open and save-as; where the system has file types, use the type
VCS. - Clipboard. Support cut, copy and paste; where clipboard formats can be registered, register the ISO 9070 formal public identifier
+//ISBN 1-887687-00-9::versit::PDI//vCalendar, and put the object on the clipboard both in that format and as plain text. - Drag and drop. Act as drag source and drag target, registering the same identifier and offering the object both registered and as plain text. Where the system has several drag protocols (file based, clipboard based), support both: the file based one for dragging a desktop file or a web URL, the clipboard based one for dragging an event or to-do from one application to another.
Conformance
- All properties must be implemented as defined (statements elsewhere that call a feature optional, or make exceptions, take precedence).
- The default character set, US-ASCII, must be supported; others are optional.
- Extensions are optional; vendor extensions should carry a vendor identifier (
X-ABC-) and must declare the minimum conformance for the extension. A reader must be able to parse a stream with extensions but need not act on them.