Internet-Draft | iCalendar series | October 2020 |
Douglass | Expires 17 April 2021 | [Page] |
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 17 April 2021.¶
Copyright (c) 2020 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.¶
The authors would like to thank the members of the Calendaring and Scheduling Consortium (CalConnect) for contributing their ideas and support.¶
Since iCalendar was first defined there has been only one way to express a repeating set of events - the recurrence. This defined a master event, a set of rules for computing the instances and a way of overriding certain instances.¶
This approach works well enough in certain situations but has many problems which need to be addressed.¶
This specification introduces a new approach to repeating patterns of entities which avoids some of the problems.¶
No terms and definitions are listed in this document.¶
The recurrence rules specify how instances are to be computed. These rules provide a set of keys - the RECURRENCE-ID - and an instance can be created with the calculated start date/time and a copy of the duration (or calculated end date/time).¶
The specification allows for overrides. These are handled by supplying a complete replacement for the instance with a RECURRENCE- ID property matching that of the instance being overridden. This may change any of the properties (except the UID) - including start, end or duration.¶
If a long lived recurrence is heavily overridden it becomes very cumbersome. The master plus overrides is considered a single resource in most circumstances (iTip allows the delivery of a single instance in certain situations).¶
Simple meetings can become heavily modified recurrences through adding the weeks agenda to the description, changing of attendees etc.¶
There are approaches being considered to mitigate some of these issues which mostly involve only storing changes but recurrences are still awkward to deal with.¶
This can lead to some very difficult problems to resolve. In the case of a heavily modified meeting it may be difficult to impossible to determine which override applies to the newly modified event.¶
For example, a weekly book-reading is moved from Monday to Friday. There are weeks of scheduled events in the future. Do we move them all forward to the next instance or skip one and move them back? If it becomes bi-weekly rather than weekly do we drop every other or just space them out more?¶
To be sure - some of these problems are not totally resolved by a series approach but they become more tractable.¶
The [RFC5545] THISANDFUTURE range is poorly supported. Splitting is what a number of implementations use to avoid changing overrides in the past.¶
The recurring event is split into 2, one being the truncated original the other being a new recurring event starting at the time of the THISANDFUTURE override.¶
There is left the problem of relating the two, this can be accomplished by use of the RELATED-TO property but that is not standardized.¶
A series is a, generally regularly, repeating sets of events or tasks each instance of which is usually, but not always, different in some respect. Examples may be a library running an after-school reading program which usually, takes place at the same time each week but always differs in the book or author being studied.¶
In recurrences an instances is a calculated 'virtual' object, unless overridden. It has the same UID as the master and a RECURRENCE-ID which is always one of the calculated set.¶
In a series, a specified number of instances are created ahead of time each with their own unique UID. They are all related to the master using a SERIES-MASTER relation type defined in this specification. Each instance acts as an individual component as far as retrieval and searching is concerned.¶
Each instance and master is identified as a member of the full series by the SERIES-UID property. The value of this property is the same in all members of the series even when splits have occurred.¶
As instances are created a LAST-SERIES-ID property is added or updated in the master to indicate which instance was last created. When there are SXDATE properties this property value may represent an instance which cannot be created. It merely represents the latest calculated date.¶
This property allows generated instances to be deleted without the addition of SXDATE properties to the master. The SXDATE only indicates future instances which MUST NOT be created.¶
As time goes on more instances are created either by the server or by a client when it inspects the current state of the series. The number of instances may be based on time or a count.¶
For example, an organization may allow rooms to be booked only 4 weeks ahead. Thus a series may be set up which has that 4 week set of events in the future. Each will have the room as an attendee ensuring that at least the room is booked at the regular time.¶
If it becomes necessary to modify the series rules or the master start then the series is always split at the point of the modification.¶
When a series is split the previous master is modifed to truncate the current series at the last generated instance and a parameter SPLIT=YES is added to the series rule to indicate that this master is now split.¶
The split may result in a number of instances related to the old series but overlapping the new. It is up to the implementation to decide what should be done with these but this usually requires a degree of interaction with a human (or very intelligent robot). The application may offer to copy them into the corresponding new instances - if these can be easily determined, offer to delete all of them or let the user manually copy information and delete.¶
The new series master is related to the old master by the new series master having a RELATED-TO property with RELTYPE=SERIES-MASTER pointing at the previous master. In that way a backwards chain of series masters may be created¶
A series master is identified in much the same way as a recurrence master. It will contain an SRULE and 0 or more SDATE properties or 1 or more SDATE properties. Additionally it may contain 0 or more SXDATE properties to exclude instances.¶
As noted above, if the series was split it may contain a RELATED-TO property with RELTYPE=SERIES-MASTER and a value of the previous series master.¶
The master will also contain a LAST-SERIES-ID if any instances have been calculated and perhaps generated.¶
It is important to note that the series master is the first member of the series. Thus the first instance always occurs AFTER the series master.¶
A series instance is identified by having a SERIES-ID property which is calculated in the same manner as a RECURRENCE-ID. It MUST also contain a RELATED-TO property with RELTYPE=SERIES-MASTER and a value being the UID of the series master.¶
As noted above, if the series was split it may contain a RELATED-TO property with RELTYPE=SERIES-MASTER and a value being the UID of the previous series master.¶
Relationship parameter type values are defined in [RFC5545]. This specification augments that parameter to include the new relationship values SERIES-MASTER.¶
This property parameter is respecified as follows:¶
This parameter can be specified on a property that references another related calendar component. The parameter may specify the hierarchical relationship type of the calendar component referenced by the property when the value is PARENT, CHILD or SIBLING. If this parameter is not specified on an allowable property, the default relationship type is PARENT. Applications MUST treat x-name and iana-token values they don't recognize the same way as they would the PARENT value.¶
This parameter defines the temporal relationship when the value is one of the project management standard relationships FINISHTOSTART, FINISHTOFINISH, STARTTOFINISH or STARTTOSTART. This property will be present in the predecessor entity and will refer to the successor entity. The GAP parameter specifies the lead or lag time between the predecessor and the successor. In the description of each temporal relationship below we refer toTask-A which contains and controls the relationship and Task-B the target of the relationship.¶
Indicates that the current calendar component depends on the referenced calendar component in some manner. For example a task may be blocked waiting on the other, referenced, task.¶
Establishes a reference from the current component to components with a REFID property which matches the value given in the associated RELATED-TO property.¶
Indicates that the current calendar component is based on the referenced calendar component. The value is a UID.¶
Establishes a reference from the current component to components with a STRUCTURED-CATEGORY property which matches the value given in the associated RELATED- TO property.¶
Task-B cannot start until Task-A finishes. For example, when sanding is complete, painting can begin.¶
Task-B cannot finish before Task-A is finished, that is the end of Task-A defines the end of Task-B. For example, we start the potatoes, then the meat then the peas but they should all be cooked at the same time.¶
The start of Task-A (which occurs after Task-B) controls the finish of Task-B. For example, ticket sales (Task-B) end when the game starts (Task-A).¶
The start of Task-A triggers the start of Task-B, that is Task-B can start anytime after Task-A starts.¶
This parameter is defined by the following notation:¶
This parameter MAY be specified on the SRULE property to indicate that the series has been split with SPLIT=YES. Once split is is probably inappropriate to modify the series further.¶
This parameter is defined by the following notation:¶
This parameter MAY be specified on the SRULE property to indicate how many series instances should be generated in advance.¶
An implementation is free to apply its own limts but MUST NOT generate more than those defined by this parameter and/or the LOOKAHEAD-PERIOD parameter.¶
If both the LOOKAHEAD-PERIOD and LOOKAHEAD-COUNT arameters are supplied the result should be limited by both.¶
For example, if the LOOKAHEAD-PERIOD parameter would cause 8 instances to be generated but LOOKAHEAD-COUNT specifies 4 then only 4 instances will be generated.¶
This parameter is defined by the following notation:¶
This parameter MAY be specified on the SRULE property to indicate how far in advance series instances should be generated.¶
An implementation is free to apply its own limts but MUST NOT generate more than those defined by this parameter and/or the LOOKAHEAD-COUNT parameter.¶
If both the LOOKAHEAD-PERIOD and LOOKAHEAD-COUNT arameters are supplied the result should be limited by both.¶
For example, if the LOOKAHEAD-PERIOD parameter would cause 8 instances to be generated but LOOKAHEAD-COUNT specifies 4 then only 4 instances will be generated.¶
The value is a quoted duration.¶
The SERIES-ID, LAST-SERIES-ID, SDATE and SXDATE properties are identical in form and in the parameters they take.¶
All must conform in form to the DTSTART property of the master component. Only the SDATE may specify a time which is not part of the calculated series.¶
An agent, either the server or a client, will periodically extend the set of instances. The number of such generated instances is limited by:¶
The UNTIL or COUNT parts of the rule define when the series terminates. Thus a COUNT=100 specifies a maximum of 100 series members.¶
This specifies how many series members can exist from the current date/time. Thus a LOOKAHEAD-COUNT=4 means a maximum of 4 generated instances.¶
This specifies how far into the future series members can be generated. Thus a LOOKAHEAD-PERIOD="PT2M" means a maximum period of 2 months.¶
This client or server SHOULD also apply limits to prevent a series from generating an overlarge set of members.¶
The starting point for the calculation is the DTSTART of the master component or the LAST-SERIES-ID if it exists in the master. In both cases the instance represented by that date is NOT generated as part of the instance set and the actual instance may have been excluded by an SXDATE property but the starting date is still valid.¶
The starting date/time property defines the first instance in the next batch of series members. Note that the starting property value MUST match the pattern of the series rule, if specified. For example, if the rule specifies every Wednesday the starting date MUST be a Wednesday.¶
The end date/time of the set will be provided by the UNTIL part of the rule, the LOOKAHEAD-PERIOD or by a system maxima.¶
A set of date/time values can be generated within those contraints. As each date/time value is generated it can be ignored if it is one of the SXDATE values.¶
Generation of values can terminate when the size of the result exceeds that given by the COUNT rule element, the LOOKAHEAD-COUNT value or any system limit.¶
Any SDATE values that fall within the current range and are not in the set of SXDATE values can be added and the result truncated again to match the size limits.¶
Finally, any date/time values that have already been generated and are present as SERIES-ID values should be removed from the set. What remains is the new set of members to extend the current series.¶
The last of those values becomes the new value for the LAST-SERIES-ID property in the series master.¶
As noted above the "SXDATE" property can be used to exclude the value specified in the master. This leads to a complication as the master needs to be preserved as a container for the values which define the series. This is flagged by adding a DELETED-MASTER element to the SERIES-STATUS property.¶
SERIES-UID¶
This property defines the persistent, globally unique identifier for the full series.¶
TEXT¶
IANA and non-standard property parameters can be specified on this property.¶
This property MUST be specified in any "VEVENT", "VTODO", and "VJOURNAL" calendar components acting as a series master or series instance.¶
The SERIES-UID MUST be globally unique. This value SHOULD be generated by following the recommendations in [RFC7986].¶
This property is defined by the following notation:¶
EXAMPLE¶
The following is an example of this property:¶
SXDATE¶
This property defines the list of DATE-TIME exceptions for series of events, to-dos or journal entries.¶
The default value type for this property is DATE-TIME. The value type can be set to DATE.¶
IANA, non-standard, value data type, and time zone identifier property parameters can be specified on this property.¶
This property can be specified in "VEVENT", "VTODO", and "VJOURNAL" calendar components acting as the series master.¶
The exception dates, if specified, are used when computing the instances of the series. They specify date/time values which are to be removed from the set of possible series instances.¶
This property is defined by the following notation:¶
EXAMPLE¶
The following is an example of this property:¶
SDATE¶
This property defines the list of DATE-TIME values for series of events, to-dos or journal entries.¶
The default value type for this property is DATE-TIME. The value type can be set to DATE.¶
IANA, non-standard, value data type, and time zone identifier property parameters can be specified on this property.¶
This property can be specified in "VEVENT", "VTODO", and "VJOURNAL" calendar components acting as the series master.¶
This property can appear along with the "SRULE" property to define a extra series occurrences. When they both appear in a series master component, the instances are defined by the union of occurrences defined by both the "SDATE" and "SRULE".¶
This property is defined by the following notation:¶
EXAMPLE¶
The following are examples of this property:¶
SERIES-ID¶
This property is used in conjunction with the "UID" and "SEQUENCE" properties to identify a specific instance of a "VEVENT", "VTODO", or "VJOURNAL" calendar component in a series. The property value is the original value of the "DTSTART" property of the series instance before any changes occur.¶
The default value type is DATE-TIME. The value type can be set to a DATE value type. This property MUST have the same value type as the "DTSTART" property contained within the series component. Furthermore, this property MUST be specified as a date with local time if and only if the "DTSTART" property contained within the series component is specified as a date with local time.¶
IANA, non-standard, value data type and time zone identifier parameters can be specified on this property.¶
This property can be specified zero or more times in any iCalendar component.¶
The SERIES-ID is the originally calculated value of the DTSTART property based on the master identified by the RELATED-TO property with a RELTYPE=SERIES-MASTER parameter.¶
This property is defined by the following notation:¶
EXAMPLE¶
The following are examples of this property:¶
LAST-SERIES-ID¶
To specify the last calculated instance of the series. When new instances are created they MUST have a SERIES-ID after the value of this property.¶
In all respects this property is identical to SERIES-ID and is in fact a copy of the SERIES-ID which would be present in the last created instance (assuming it is not suppressed by an SXDATE).¶
DATE or DATE_TIME (the default). This has the same requirements as SERIES-ID.¶
IANA, non-standard, value data type and time zone identifier parameters can be specified on this property.¶
This property MAY be specified in any iCalendar component.¶
When used in a component the value of this property points to additional information related to the component. For example, it may reference the originating web server.¶
This property is defined by the following notation:¶
EXAMPLE¶
The following is an example of this property. It points to a server acting as the source for the calendar object.¶
RRULE¶
This property defines a rule or repeating pattern for a series of events, to-dos or journal entries.¶
RECUR¶
IANA, non-standard, look-ahead count or date property parameters can be specified on this property.¶
This property can be specified in any "VEVENT", "VTODO", and "VJOURNAL" calendar component, but it SHOULD NOT be specified more than once.¶
The series rule, if specified, is used in computing the instances to be generated for the series. These are generated by considering the master "DTSTART" property along with the "SRULE", "SDATE", and "SXDATE" properties contained within the series master. The "DTSTART" property defines the first instance in the recurrence set which is represented by that master event.¶
Unlike the RRULE the "DTSTART" property MUST be synchronized with the series rule, if specified. For example, if the DTSTARTS species a date on Wednesday but the SRULE specifies every Tuesday then a server or client MUSt reject the component.¶
The final series is represented by gathering all of the start DATE-TIME values generated by any of the specified "SRULE" and "SDATE" properties, and then excluding any start DATE-TIME values specified by "SXDATE" properties. This implies that start DATE- TIME values specified by "SXDATE" properties take precedence over those specified by inclusion properties (i.e., "SDATE" and "SRULE"). Where duplicate instances are generated by the "SRULE" and "SDATE" properties, only one instance is considered. Duplicate instances are ignored.¶
The "DTSTART" property specified within the master iCalendar object defines the first instance of the recurrence. In most cases, a "DTSTART" property of DATE-TIME value type used with a series rule, should be specified as a date with local time and time zone reference to make sure all the recurrence instances start at the same local time regardless of time zone changes.¶
If the duration of the series component is specified with the "DTEND" or "DUE" property, then the same exact duration will apply to all the members of the generated series. Else, if the duration of the series master component is specified with the "DURATION" property, then the same nominal duration will apply to all the members of the generated series and the exact duration of each instance will depend on its specific start time. For example, series instances of a nominal duration of one day will have an exact duration of more or less than 24 hours on a day where a time zone shift occurs. The duration of a specific instance may be modified in an exception component or simply by using an "SDATE" property of PERIOD value type.¶
This property is defined by the following notation:¶
EXAMPLE¶
TODO - Say they are pretty much the same as RRULE but extra params¶
Any clients following the approach specified in [RFC5545] are expected to ignore any properties or parameters they don't recognize.¶
For such clients the series appears to be an unconnected set of components. They all have their own unique UIDS. If the client updates an instance this should be identical in effect to an update carried out by a client aware of the new properties.¶
Updates MUST preserve the SERIES-ID, LAST-SERIES-ID, SRULE, SDATE and SXDATE properties. A client which does not do so is in violation of [RFC5545].¶
TODO - More text needed here...¶
This specification may extend Caldav by adding reports to return all members of a series given the series master UID. This could be handled by the current query mechanism but it is likely to be sufficiently frequently used that a special query is appropriate.¶
It is also likely we will want a CalDAV operation to split a series and generate the additional members of the series as a single atomic operation. == Security Considerations¶
Clients and servers should take care to limit the number of generated instances to a reasonable value. This can be a relatively small value.¶
The following iCalendar property names have been added to the iCalendar Properties Registry defined in [RFC5545].¶