Internet-Draft | iCalendar Fractional Time | July 2021 |
Jenkins, et al. | Expires 8 January 2022 | [Page] |
This document defines a way to represent fractional seconds in iCalendar.¶
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 8 January 2022.¶
Copyright (c) 2021 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.¶
There has been an expressed need for the ability to use fractional seconds in iCalendar. With the advent of JSCalendar there is a way to do so in that representation. This specification provides a - partially backwards compatible - way to represent such times in iCalendar.¶
It is probable that applications needing fractional seconds require recurrence rules that use sub-second intervals.¶
This specification also shows how values should be mapped to and from JSCalendar.¶
Applications receiving a property with a FRACTIONAL parameter MUST ensure its value is consistent with the value of the property. The property value must match:¶
- a positive FRACTIONAL value rounded up to the next non-fractional second or¶
- a negative FRACTIONAL value rounded down the next non-fractional second¶
This parameter is defined by the following notation:¶
fractional-param = DATE-TIME or DURATION¶
DTSTART;FRACTIONAL=20190605T133015.03:20190605T133015¶
If the property has a FRACTIONAL parameter first check that it is a valid value using the criteria specified in Section 2.1. if valid, use that value for the iCalendar property.¶
If the property has no FRACTIONAL parameter or the value of that parameter is invalid then use the normal property value.¶
For example:¶
... ESTIMATED-DURATION;FRACTIONAL="PT17H15M23.5S:PT18H ... The value here is "PT18H" because the FRACTIONAL parameter is not valid. ... ESTIMATED-DURATION:PT18H ... The value here is "PT18H" because there is no FRACTIONAL parameter. ... ESTIMATED-DURATION;FRACTIONAL="PT17H15M23.5S:PT17H15M24S ... The value here is "PT17H15M23.5S" because the FRACTIONAL parameter is valid.¶
When mapping properties possibly containing time, use the iCalendar property value obtained as specified in Section 3.¶
For example:¶
... ESTIMATED-DURATION;FRACTIONAL="PT17H15M23.5S:PT18H ... maps to ... "estimatedDuration": "PT18H" ... because the FRACTIONAL parameter is not valid.. ... ESTIMATED-DURATION:PT18H ... maps to ... "estimatedDuration": "PT18H" ... and ... ESTIMATED-DURATION;FRACTIONAL="PT17H15M23.5S:PT17H15M24S ... maps to ... "estimatedDuration": "PT17H15M23.5S" ... because the FRACTIONAL parameter is valid.¶
If the jscalendar property value has fractional seconds then the [RFC5545] value is set to the jscalendar property value rounded up to the next non-fractional value and a FRACTIONAL parameter is added with the full unrounded value.¶
For example:¶
... "duration": "PT0.5S" ... maps to ... DURATION;FRACTIONAL="PT0.5S":PT1S ... and ... "duration": "PT1H" ... maps to ... DURATION:PT1H ...¶
It is probably the case that subsecond intervals are most useful for short recurrence intervals. Neither JSCalendar nor iCalendar currently allows that.¶
This probably only requires that the interval value be allowed to contain fractional values (for seconds frequency only?).¶