These are the fields that are both in tasks and events. This base class can be called incidence.
<summary>(string, default "")</summary>
<location>(string, default "")</location>
<creator>
<display-name>(string, default "")</display-name>
<smtp-address>(string, default "")</smtp-address>
</creator>
<organizer>
<display-name>(string, default "")</display-name>
<smtp-address>(string, default "")</smtp-address>
</organizer>
<start-date>(date or datetime, default not present)</start-date>
<alarm>(number, no default)</alarm>
<recurrence cycle="cycletype" [type="extra type"]>
<interval>(number, default 1)</interval>
{<day>(string, no default)</day>}
<daynumber>(number, no default)</daynumber>
<month>(string, no default></month>
<range type="rangetype">(date or number or nothing, no default)</range>
{<exclusion>(date, no default)</exclusion>}
</recurrence>
{<attendee>
<display-name>(string, default "")</display-name>
<smtp-address>(string, default "")</smtp-address>
<status>(string, default none)</status>
<request-response>(bool, default true)</request-response>
<role>(string, default "required")</role>
</attendee>}The start-date is optional for tasks. For events, it is required. If they are there, they can either have a date or a datetime as the type. Parsing this is just a matter of looking at the length of the date string. In the case of an all day event (floating event) the end-date MUST be in date only format
The alarm specifies the number of minutes before the incidence when the alarm should fire. In case of incidences with only a start date but no specific time, this means minutes before 0:00 on that day.
There can be one <recurrence> tag. This tag has an attribute cycle that is one of "daily", "weekly", "monthly", or "yearly". Depending on the cycle, different subtags are valid:
daily: Interval specifies "every X days".
weekly: Interval specifies "every X weeks". Day can be monday, tuesday wednesday, thursday, friday, saturday, and sunday. There can be 1 to 7 of these days.
monthly: The recurrence tag has a second attribute type, which can be either "daynumber" or "weekday". In both cases, interval specifies "every X months". In the case of "daynumber", tag <daynumber> gives the date in the month this recurs on. For "weekday", tags <daynumber> and <day> must be there.
yearly: The recurrence tag has a second attribute type, which can be either "monthday", "yearday" or "weekday". In both cases, interval specifies "every X years". "monthday" is e.g. "23rd of March", and uses the tags <daynumber> and <month>. "yearday" is e.g. "155th day in the year", as specified by <daynumber>. This subtype isn't supported by Outlook. "weekday" is e.g. "2nd Friday of September", and uses the tags <daynumber>, <day> and <month>.
The range must also be present. This can be "none", which means a never ending recurrence. Or "number", which specifies the number of times this recurrence happens (before exclusions are subtracted). Or "date", which means the recurrence does not happen after this date.
Finally there can be any number of exclusions. These are dates that are removed from the list of recurrences after all other calculations are done. This specifically means if you recur three times but have an exclusion on one of the dates, there will actually only be two recurrences.
Neverending incidence every 4 days with no exclusions:
<recurrence cycle="daily">
<interval>4</interval>
<range type="none"/>
</recurrence>Recurrence weekly on mondays and thursdays, until 5 has happened. No exclusions:
<recurrence cycle="weekly">
<interval>3</interval>
<day>monday</day>
<day>thursday</day>
<range type="number">5</range>
</recurrence>Same one, but this time with one exclusion. Note that the actual ending is the same, meaning in reality only four incidences happened:
<recurrence cycle="weekly">
<interval>3</interval>
<day>monday</day>
<day>thursday</day>
<range type="number">5</range>
<exclusion>2005-05-04</exclusion>
</recurrence>Monthly recurrence. Happens until June 1st 2006 on the 3rd of every second month with no exclusions:
<recurrence cycle="monthly" type="daynumber">
<interval>2</interval>
<daynumber>3</daynumber>
<range type="date">2006-06-01</range>
</recurrence>Monthly infinite recurrence with two exclusions. Happens every second thursday of every sixth month:
<recurrence cycle="monthly" type="weekday">
<interval>6</interval>
<daynumber>2</daynumber>
<day>thursday</day>
<range type="none"/>
<exclusion>2005-12-12</exclusion>
<exclusion>2006-06-15</exclusion>
</recurrence>Yearly recurrence ending after 2005 with no exclusions. Happens every May 4th:
<recurrence cycle="yearly" type="monthday">
<interval>1</interval>
<daynumber>4</daynumber>
<month>june</month>
<range type="date">2005-12-31</range>
</recurrence>Yearly infinite recurrence with no exclusions. Happens every second year on the 125th day:
<recurrence cycle="yearly" type="yearday">
<interval>2</interval>
<daynumber>125</daynumber>
<range type="none"/>
</recurrence>Yearly infinite recurrence with no exclusions. Happens every third year on the 2nd Friday of September:
<recurrence cycle="yearly" type="weekday">
<interval>3</interval>
<daynumber>2</daynumber>
<day>friday</day>
<month>september</month>
<range type="none"/>
</recurrence>There can be any number of attendees.
The status must be one of none, tentative, accepted, or declined. role is one of required, optional, or resource.