Internet-Draft iCalendar Fractional Time July 2021
Jenkins, et al. Expires 8 January 2022 [Page]
Workgroup:
Calendaring extensions
Internet-Draft:
draft-douglass-icalendar-fractional-time-00
Published:
Intended Status:
Standards Track
Expires:
Authors:
N.M. Jenkins
FastMail
R. Stepanek
FastMail
M. Douglass
BCS

iCalendar: Representing fractional seconds in iCalendar

Abstract

This document defines a way to represent fractional seconds in iCalendar.

Status of This Memo

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.

Table of Contents

1. Introduction

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.

2. New iCalendar parameters

2.1. FRACTIONAL parameter

Parameter name:
FRACTIONAL
Purpose:
This parameter is used to contain a value with fractional seconds for time values and durations.
Description:
This parameter MAY be specified on properties of type DATE-TIME or DURATION. It MUST be a valid iCalendar DATE-TIME or DURATION value with the addition of fractional seconds. The value MUST NOT be negative for durations but MAY be negative for alarm triggers.

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

If the values do not match the the application MUST assume that the property value has been updated by an application that is unaware of the FRACTIONAL parameter. The parameter should be ignored in this case.
Format Definition:

This parameter is defined by the following notation:

                  fractional-param = DATE-TIME or DURATION
Example:
    DTSTART;FRACTIONAL=20190605T133015.03:20190605T133015

3. Obtaining a Property Value

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.

4. Mapping from iCalendar to JSCalendar

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.

5. Mapping from iCalendar to JSCalendar

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
   ...

6. Open issues

6.1. Recurrences

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?).

7. Normative References

[RFC5545]
Desruisseaux, B., Ed., "Internet Calendaring and Scheduling Core Object Specification (iCalendar)", RFC 5545, DOI 10.17487/RFC5545, , <https://www.rfc-editor.org/info/rfc5545>.

Authors' Addresses

Neil Jenkins
FastMail
PO Box 234
Collins St West
Melbourne VIC 8007
Australia
Robert Stepanek
FastMail
PO Box 234
Collins St West
Melbourne VIC 8007
Australia
Michael Douglass
Bedework Commercial Services
226 3rd Street
Troy, NY 12180
United States of America