Internet DRAFT - draft-douglass-icalendar-fractional-time

draft-douglass-icalendar-fractional-time







Calendaring extensions                                        N. Jenkins
Internet-Draft                                               R. Stepanek
Intended status: Standards Track                                FastMail
Expires: January 8, 2022                                     M. Douglass
                                                                     BCS
                                                            July 7, 2021


        iCalendar: Representing fractional seconds in iCalendar
              draft-douglass-icalendar-fractional-time-00

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 January 8, 2022.

Copyright Notice

   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.




Jenkins, et al.          Expires January 8, 2022                [Page 1]

Internet-Draft          iCalendar Fractional Time              July 2021


Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  New iCalendar parameters  . . . . . . . . . . . . . . . . . .   2
     2.1.  FRACTIONAL parameter  . . . . . . . . . . . . . . . . . .   2
   3.  Obtaining a Property Value  . . . . . . . . . . . . . . . . .   3
   4.  Mapping from iCalendar to JSCalendar  . . . . . . . . . . . .   4
   5.  Mapping from iCalendar to JSCalendar  . . . . . . . . . . . .   4
   6.  Open issues . . . . . . . . . . . . . . . . . . . . . . . . .   5
     6.1.  Recurrences . . . . . . . . . . . . . . . . . . . . . . .   5
   7.  Normative References  . . . . . . . . . . . . . . . . . . . .   5
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .   6

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




Jenkins, et al.          Expires January 8, 2022                [Page 2]

Internet-Draft          iCalendar Fractional Time              July 2021


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





Jenkins, et al.          Expires January 8, 2022                [Page 3]

Internet-Draft          iCalendar Fractional Time              July 2021


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




Jenkins, et al.          Expires January 8, 2022                [Page 4]

Internet-Draft          iCalendar Fractional Time              July 2021


   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, September 2009,
              <https://www.rfc-editor.org/info/rfc5545>.






Jenkins, et al.          Expires January 8, 2022                [Page 5]

Internet-Draft          iCalendar Fractional Time              July 2021


Authors' Addresses

   Neil Jenkins
   FastMail
   PO Box 234
   Collins St West
   Melbourne  VIC 8007
   Australia

   Email: neilj@fastmailteam.com
   URI:   https://www.fastmail.com


   Robert Stepanek
   FastMail
   PO Box 234
   Collins St West
   Melbourne  VIC 8007
   Australia

   Email: rsto@fastmailteam.com
   URI:   https://www.fastmail.com


   Michael Douglass
   Bedework Commercial Services
   226 3rd Street
   Troy, NY  12180
   United States of America

   Email: mdouglass@bedework.com
   URI:   http://bedework.com



















Jenkins, et al.          Expires January 8, 2022                [Page 6]