<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<rfc ipr="trust200902" category="std" docName="draft-jenkins-jscalendar-01">
    <?rfc toc="yes"?>
    <?rfc symrefs="yes"?>
    <?rfc sortrefs="yes"?>
    <?rfc compact="no"?>
    <?rfc subcompact="no"?>
    <?rfc private=""?>
    <?rfc topblock="yes"?>
    <?rfc comments="no"?>

    <front>
        <title abbrev="JSEvent">JSCalendar: A JSON representation of calendar data</title>
        <author initials="N.M." surname="Jenkins" fullname="Neil Jenkins">
            <organization>FastMail</organization>
            <address>
                <postal>
                    <street>PO Box 234</street>
                    <street>Collins St West</street>
                    <city>Melbourne</city>
                    <code>VIC 8007</code>
                    <country>Australia</country>
                    <region/>
                </postal>
                <phone/>
                <email>neilj@fastmailteam.com</email>
                <uri>https://www.fastmail.com</uri>
            </address>
        </author>
        <author initials="R." surname="Stepanek" fullname="Robert Stepanek">
            <organization>FastMail</organization>
            <address>
                <postal>
                    <street>PO Box 234</street>
                    <street>Collins St West</street>
                    <city>Melbourne</city>
                    <code>VIC 8007</code>
                    <country>Australia</country>
                    <region/>
                </postal>
                <email>rsto@fastmailteam.com</email>
                <uri>https://www.fastmail.com</uri>
            </address>
        </author>
        <date year="2017" month="September" day="18"/>
        <area>Applications</area>
        <workgroup>JSON data formats for iCalendar</workgroup>
        <keyword>JSON</keyword>
        <keyword>iCalendar</keyword>
        <keyword>calendar</keyword>
        <keyword>events</keyword>
        <keyword>date</keyword>
        <keyword>time</keyword>
        <abstract>
            <t>
                This specification defines a JSON representation of calendar data that can be used for storage and data
                exchange in a calendaring and scheduling environment. It aims to be an alternative to the widely
                deployed iCalendar data format and to be unambiguous, extendable and simple to process.
            </t>
        </abstract>
    </front>

    <middle>
        <section anchor="introduction" title="Introduction">
            <t>
                This document defines a JSON-based format to exchange event and task objects,
                or groups of such objects, in electronic calendar applications and systems. It
                uses a data model that aims to be unambiguous, extendable and simple to
                process.
            </t>
            <t>
                The key design considerations for this format are as follows:
                <list style="symbols">
                    <t>
                        The attributes of the calendar entry represented must be described as a simple key-value pair,
                        reducing complexity of its representation.
                    </t>
                    <t>
                        The data format should avoid all ambiguities, making it difficult to make mistakes during
                        implementation and increasing interoperability.
                    </t>
                    <t>
                        Most of the initial set of attributes should be taken from the iCalendar data format
                        (<xref target="RFC5545"/>, also see <xref target="relation-to-icalendar"/>), but a
                        conversion between the data formats is not guaranteed to be completed without losing semantic
                        meaning.
                    </t>
                    <t>
                        Extensions, such as new properties and components, MUST NOT lead to requiring an update to this
                        document.
                    </t>
                </list>
            </t>
            <t>
                JSON is a text-based data interchange format as specified in <xref target="RFC7493"/>.
                The I-JSON format defined in <xref target="RFC7493"/> is a strict subset of this, adding restrictions to
                avoid potentially confusing scenarios (for example, it mandates that an object MUST NOT have two
                properties with the same key).  Using JSON mostly is a pragmatic choice: its
                widespread use helps to speed up JSCalendar adoption and a wide range of
                production-ready JSON implementations allows to decrease interoperability issues.
            </t>
            <section anchor="relation-to-icalendar" title="Relation to the iCalendar format">
                <t>
                    The iCalendar data format <xref target="RFC5545"/>, a widely deployed interchange format for calendaring
                    and scheduling data, has served calendaring vendors for a long while, but contains some ambiguities and
                    pitfalls that can not be overcome without backwards incompatible changes.
                </t>
                <t>
                    For example, iCalendar defines various formats for local times, UTC time and dates, which
                    confuses new users. Other sources for errors are the requirement for custom timezone definitions
                    within a single calendar component, as well as the iCalendar format itself; the latter causing
                    interoperability issues due to misuse of CR LF terminated strings, line continuations and subtle
                    differences between iCalendar parsers. Lastly, up until recently the iCalendar format did not allow to
                    express the difference between two calendar components, which results in verbose exchanges during
                    scheduling.
                </t>
                <t>
                    Some of these issues were addressed by the <xref target="RFC7265">jCal</xref> format, which is a direct
                    mapping between iCalendar and JSON. However, it did not attempt to extend or update iCalendar semantics.
                </t>
            </section>
            <section anchor="notational-conventions" title="Notational Conventions">
                <t>
                    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT",
                    "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in
                    <xref target="RFC2119"/>.
                </t>
                <t>
                    The underlying format used for this specification is JSON. Consequently, the terms "object" and
                    "array" as well as the four primitive types (strings, numbers, booleans, and null) are to be
                    interpreted as described in Section 1 of<xref target="RFC7159"/>.
                </t>
                <t>Some examples in this document contain "partial" JSON documents used for illustrative purposes. In
                    these examples, three periods "..." are used to indicate a portion of the document that has been
                    removed for compactness.
                </t>
            </section>
        </section>

        <section anchor="structure-of-jscalendar-objects" title="Structure of JSCalendar objects">
            <t>
                A JSCalendar object is a JSON object, which MUST be valid I-JSON (a stricter subset of JSON), as
                specified in <xref target="RFC7159"/>. Property names and values are case-sensitive.
            </t>
            <t>
                The object has a collection of properties, as specified in the following sections. Unless otherwise
                specified, all properties are optional; omitted properties MUST be treated identically to if that
                property had the value of <spanx style="verb">null</spanx>, unless otherwise specified.
            </t>
            <section anchor="type-signatures" title="Type signatures">
                <t>
                    Types signatures are given for all JSON objects in this document. The following conventions are
                    used:
                </t>
                <t>
                    <list style="symbols">
                        <t>
                            <spanx style="verb">Boolean|String</spanx>:
                            The value is either a JSON <spanx style="verb">Boolean</spanx> value, or a JSON
                            <spanx style="verb">String</spanx> value.
                        </t>
                        <t>
                            <spanx style="verb">Foo</spanx>:
                            Any name that is not a native JSON type means an object for which the properties (and
                            their types) are defined elsewhere within this document.
                        </t>
                        <t>
                            <spanx style="verb">Foo[]</spanx>:
                            An array of objects of type <spanx style="verb">Foo</spanx>.
                        </t>
                        <t>
                            <spanx style="verb">String[Foo]</spanx>:
                            A JSON <spanx style="verb">Object</spanx> being used as a map (associative array), where
                            all the values are of type <spanx style="verb">Foo</spanx>.
                        </t>
                    </list>

                </t>
            </section>
            <section anchor="data-types" title="Data Types">
                <t>
                    In addition to the standard JSON data types, the following data types are used in this
                    specification:
                </t>
                <section anchor="utcdate-type" title="UTCDate">
                    <t>
                        This is a string in
                        <xref target="RFC3339"/>
                        <spanx style="verb">date-time</spanx>
                        format, with the further restrictions that any letters
                        MUST be in upper-case, the time component MUST be included and the time MUST be in UTC.
                        Fractional second values MUST NOT be included unless non-zero and MUST NOT have
                        trailing zeros, to ensure there is only a single representation for each date-time.
                        <vspace blankLines="1"/>
                        For example
                        <spanx style="verb">2010-10-10T10:10:10.003Z</spanx> is OK, but
                        <spanx style="verb">2010-10-10T10:10:10.000Z</spanx> is invalid and MUST be
                        encoded as <spanx style="verb">2010-10-10T10:10:10Z</spanx>.
                    </t>
                    <t>
                        In common notation, it should be of the form <spanx style="verb">YYYY-MM-DDTHH:MM:SSZ</spanx>.
                    </t>
                </section>
                <section anchor="localdate-type" title="LocalDate">
                    <t>
                        This is a date-time string <spanx style="emph">with no time zone/offset information</spanx>.
                        It is otherwise in the same format as UTCDate: <spanx style="verb">
                        YYYY-MM-DDTHH:MM:SS</spanx>. The time zone to associate the LocalDate with comes from an
                        associated property, or if no time zone is associated it defines
                        <spanx style="emph">floating time</spanx>. Floating date-times
                        represents all such points in time that are represented on all time-lines
                        with the same calendar day and clock time.
                    </t>
                </section>
                <section anchor="duration-type" title="Duration">
                    <t>
                        A duration is represented by a subset of ISO8601 duration format, as specified by the following
                        ABNF:
                    </t>
                    <figure>
                        <artwork><![CDATA[
    dur-secfrac = "." 1*DIGIT
    dur-second  = 1*DIGIT [dur-secfrac] "S"
    dur-minute  = 1*DIGIT "M" [dur-second]
    dur-hour    = 1*DIGIT "H" [dur-minute]
    dur-time    = "T" (dur-hour / dur-minute / dur-second)
    dur-day     = 1*DIGIT "D"

    duration    = "P" (dur-day [dur-time] / dur-time)
    ]]></artwork>
                    </figure>

                    <t>
                        In addition, the duration MUST NOT include fractional second values unless the fraction is
                        non-zero. A zero duration MUST be represented as <spanx style="verb">P0D</spanx>.
                    </t>
                </section>
                <section anchor="patchobject-type" title="PatchObject">
                    <t>
                        A <spanx style="strong">PatchObject</spanx> is of type <spanx style="verb">
                        String[*|null]</spanx>, and represents an unordered set of patches on a JSON object.
                        The keys are a path in a subset of
                        <xref target="RFC6901"/>
                        JSON pointer format, with an implicit leading <spanx style="verb">/</spanx> (i.e. prefix each
                        key with <spanx style="verb">/</spanx> before applying the JSON pointer evaluation algorithm).

                    </t>
                    <t>
                        The pointer MUST NOT reference inside an array (i.e. you MUST NOT insert/delete from an array;
                        the array MUST be replaced in its entirety instead). Any patch with a key that attempts to do
                        this MUST be ignored.
                    </t>
                    <t>
                        When evaluating a path, all parts prior to the last (i.e. the value after the final slash) MUST
                        exist for the patch to be valid. If not, the patch MUST be ignored.
                    </t>
                    <t>
                        There MUST NOT be two patches in the PatchObject where the pointer of one is the prefix of the
                        pointer of the other, e.g. <spanx style="verb">alerts/1/offset</spanx> and <spanx style="verb">
                        alerts</spanx>. The result in this case is undefined.
                    </t>
                    <t>
                        The value associated with each pointer is either:
                        <list style="symbols">
                            <t>
                                <spanx style="verb">null</spanx>: Remove the property from the patched object. If not
                                present in the parent, this a no-op.
                            </t>
                            <t>
                                Anything else: The value to replace the inherited property on the patch object with (if
                                present) or add to the property (if not present).
                            </t>
                        </list>

                    </t>
                </section>
                <section anchor="normalisation" title="Normalisation and equivalence">
                    <t>
                        JSCalendar aims at providing unambiguous definitions for value types and
                        properties, but does not define a general normalisation or equivalence method for
                        JSCalendar objects. This is because the notion of equivalence might range
                        from byte-level equivalence to semantic equivalence, depending on the
                        respective use case.
                        <vspace blankLines="1"/>
                        For example, the CalDAV protocol
                        <xref target="RFC4791"/> requires octet equivalence of the encoded calendar
                        object to determine ETag equivalence.
                        In addition:
                        <list style="symbols">
                            <t>
                                Custom JSCalendar properties may contain arbitrary JSON values,
                                including arrays. However, equivalence of arrays might or might not
                                depend on the order of elements, depending on the respective property
                                definition.
                            </t>
                            <t>
                                Several JSCalendar property values are defined as URIs
                                and MIME types, but normalisation of these types is inherently
                                protocol and scheme-specific (<xref target="RFC3986"/>), depending
                                on the use-case of the equivalence definition.
                            </t>
                        </list>
                        Considering this, the definition of equivalence and
                        normalisation is left to client and server implementations and to be negotiated
                        by a calendar exchange protocol or defined by another RFC.
                    </t>
                </section>
            </section>

            <section anchor="custom-properties" title="Custom property extensions and values">
                <t>
                    Vendors MAY add additional properties to the calendar object to support their custom features. The
                    names of these properties MUST be prefixed with a domain name controlled by the vendor to avoid
                    conflict, e.g. <spanx style="verb">fastmail.com/customprop</spanx>.
                </t>
                <t>
                    Some JSCalendar properties allow vendor-specific value extensions. If so, vendor specific values
                    MUST be prefixed with a domain name controlled by the vendor,
                    e.g. <spanx style="verb">fastmail.com/customrel</spanx>, unless otherwise noted.
                </t>
            </section>
        </section>

        <section anchor="jscalendar-props" title="JSCalendar properties">
            <t>
                JSCalendar objects share a set of common properties, but might only support a subset of them.
                Refer to the respective object type definitions (<xref target="jscalendar-objects"/>) for which common
                properties they support.
            </t>
            <section anchor="metadata-properties" title="Metadata properties">

                <section anchor="type" title="@type">
                    <t>
                        Type:
                        <spanx style="verb">String</spanx>
                    </t>
                    <t>
                        Specifies the type which this object represents.
                        This MUST be one of the following values,
                        registered in a future RFC, or a vendor-specific value:
                        <list style="symbols">
                            <t>
                                <spanx style="verb">jsevent</spanx>: a JSCalendar event (<xref target="jsevent"/>).
                            </t>
                            <t>
                                <spanx style="verb">jstask</spanx>: a JSCalendar task (<xref target="jstask"/>).
                            </t>
                            <t>
                                <spanx style="verb">jsgroup</spanx>: a JSCalendar group (<xref target="jsgroup"/>).
                            </t>
                        </list>
                    </t>
                    <t>
                        A valid JSCalendar object MUST include this property.
                    </t>
                </section>

                <section anchor="uid" title="uid">
                    <t>
                        Type:
                        <spanx style="verb">String</spanx>
                    </t>
                    <t>
                        A globally unique identifier, used to associate the object as the same across different systems,
                        calendars and views. Note that all JSCalendar objects share the same id space, so there MUST NOT
                        be two JSCalendar objects of different type with the same uid. <xref target="RFC4122"/> describes
                        a range of established algorithms to generate universally unique identifiers (UUID), and is
                        recommended to use.
                    </t>
                    <t>
                        A valid JSCalendar object MUST include this property.
                    </t>
                </section>

                <section anchor="relatedTo" title="relatedTo">
                    <t>
                        Type:
                        <spanx style="verb">String[Relation]|null</spanx>
                    </t>
                    <t>
                        Relates the object to other JSCalendar objects. This is represented as a map of the uid of
                        the related object to information about the relation.
                    </t>
                    <t>
                        A <spanx style="strong">Relation</spanx> object has the following properties:
                    </t>
                    <t>
                        <list style="symbols">
                            <t>
                                <spanx style="strong">relation</spanx>: <spanx style="verb">String[]</spanx> Describes
                                how the linked object is related to this object.
                                <vspace blankLines="1"/>
                                The strings in the array MUST each be at most one of the following values,
                                registered in a future RFC, or a vendor-specific value:
                                <list style="symbols">
                                    <t>
                                        <spanx style="verb">first</spanx>: The linked object is the first in the series
                                        this object is part of.
                                    </t>
                                    <t>
                                        <spanx style="verb">next</spanx>: The linked object is the next in the series
                                        this object is part of.
                                    </t>
                                    <t>
                                        <spanx style="verb">child</spanx>: The linked object is a subpart of this
                                        object.
                                    </t>
                                    <t>
                                        <spanx style="verb">parent</spanx>: This object is part of the overall linked
                                        object.
                                    </t>
                                </list>

                            </t>
                        </list>
                    </t>
                    <t>
                        If an object is split to make a "this and future" change to a recurrence, the original object
                        MUST be truncated to end at the previous occurrence before this split, and a new object
                        created to represent all the objects after the split.
                    </t>
                    <t>
                        A
                        <spanx style="verb">relation=["next"]</spanx>
                        relatedTo property MUST be set on the original object with the
                        uid of the new object. A
                        <spanx style="verb">relation=["first"]</spanx>
                        relatedTo property with the UID of the first object in the
                        series MUST be set on the new object. Clients can then follow these UIDs to get the complete
                        set of objects if the user wishes to modify them all at once.
                    </t>
                </section>

                <section anchor="prodId" title="prodId">
                    <t>
                        Type:
                        <spanx style="verb">String|null</spanx>
                    </t>
                    <t>
                        The identifier for the product that created the JSCalendar object.
                    </t>
                    <t>
                        The vendor of the implementation SHOULD ensure that this is a globally unique identifier, using
                        some technique such as an FPI value, as defined in [ISO.9070.1991].
                    </t>
                    <t>
                        This property SHOULD NOT be used to alter the interpretation of an JSCalendar object beyond the
                        semantics specified in this document. For example, it is not to be used to further the
                        understanding of non-standard properties.
                    </t>
                </section>


                <section anchor="created" title="created">
                    <t>
                        Type:
                        <spanx style="verb">UTCDate|null</spanx>
                    </t>
                    <t>
                        The date and time this object was initially created.
                    </t>
                </section>

                <section anchor="updated" title="updated">
                    <t>
                        Type:
                        <spanx style="verb">UTCDate</spanx>
                    </t>
                    <t>
                        The date and time the data in this object was last modified.
                    </t>
                </section>

                <section anchor="sequence" title="sequence">
                    <t>
                        Type: <spanx style="verb">Number</spanx> (Defaults to <spanx style="verb">0</spanx> if omitted)
                    </t>
                    <t>
                        Initially zero, this MUST be a non-negative integer that is monotonically
                        incremented each time a change is made to the object.
                    </t>
                </section>

                <section anchor="method" title="method">
                    <t>
                        Type:
                        <spanx style="verb">String|null</spanx>
                    </t>
                    <t>
                        The iTIP (<xref target="RFC5546"/>) method, in lower-case. Used for scheduling.
                    </t>
                </section>

            </section>

            <section anchor="time-properties" title="Time, duration and recurrence properties">

                <section anchor="recurrenceRule" title="recurrenceRule">
                    <t>
                        Type:
                        <spanx style="verb">Recurrence</spanx>
                    </t>
                    <t>
                        Defines a recurrence rule (repeating pattern) for recurring calendar objects.
                    </t>
                    <t>
                        A <spanx style="strong">Recurrence</spanx> object is a JSON object mapping of a RECUR value type
                        in iCalendar, see
                        <xref target="RFC5545"/>
                        and<xref target="RFC7529"/>.
                        Objects recur by applying the recurrence rule (and <spanx style="strong">
                        recurrenceOverrides</spanx>) to the <spanx style="strong">start</spanx> date/time.
                        A <xref target="jstask">JSTask</xref> without a <spanx style="strong">start</spanx> recurs by
                        its <spanx style="strong">due</spanx> date/time, if defined.
                    </t>
                    <t>
                        A Recurrence object has the following properties:
                        <list style="symbols">
                            <t>
                                <spanx style="strong">frequency</spanx>:
                                <spanx style="verb">String</spanx>
                                This MUST be one of the following values:
                                <list style="symbols">
                                    <t>
                                        <spanx style="verb">yearly</spanx>
                                    </t>
                                    <t>
                                        <spanx style="verb">monthly</spanx>
                                    </t>
                                    <t>
                                        <spanx style="verb">weekly</spanx>
                                    </t>
                                    <t>
                                        <spanx style="verb">daily</spanx>
                                    </t>
                                    <t>
                                        <spanx style="verb">hourly</spanx>
                                    </t>
                                    <t>
                                        <spanx style="verb">minutely</spanx>
                                    </t>
                                    <t>
                                        <spanx style="verb">secondly</spanx>
                                    </t>
                                </list>
                                To convert from iCalendar, simply lower-case the FREQ part.

                            </t>
                            <t>
                                <spanx style="strong">interval</spanx>: <spanx style="verb">Number</spanx>(optional,
                                defaults to <spanx style="verb">1</spanx>)
                                The INTERVAL part from iCal. If included, it MUST be an integer <spanx style="verb">x >=
                                1</spanx>.

                            </t>
                            <t>
                                <spanx style="strong">rscale</spanx>: <spanx style="verb">String</spanx>(optional,
                                defaults to <spanx style="verb">"gregorian"</spanx>)
                                The RSCALE part from iCalendar <xref target="RFC7529">RSCALE</xref>, converted to
                                lower-case.

                            </t>
                            <t>
                                <spanx style="strong">skip</spanx>: <spanx style="verb">String</spanx>(optional,
                                defaults to <spanx style="verb">"omit"</spanx>)
                                The SKIP part from iCalendar <xref target="RFC7529">RSCALE</xref>, converted to
                                lower-case.

                            </t>
                            <t>
                                <spanx style="strong">firstDayOfWeek</spanx>: <spanx style="verb">String</spanx>(optional,
                                defaults to <spanx style="verb">"mo"</spanx>)
                                The WKST part from iCalendar, represented as a lower-case abbreviated two-letter English
                                day of the week.
                                If included, it MUST be one of the following values: <spanx style="verb">
                                "mo"|"tu"|"we"|"th"|"fr"|"sa"|"su"</spanx>.

                            </t>
                            <t>
                                <spanx style="strong">byDay</spanx>: <spanx style="verb">NDay[]</spanx>(optional)
                                An <spanx style="strong">NDay</spanx> object has the following properties:
                                <list style="symbols">
                                    <t>
                                        <spanx style="strong">day</spanx>: <spanx style="verb">String</spanx> The
                                        day-of-the-week part of the BYDAY value in iCalendar, lower-cased. MUST be one
                                        of the following values: <spanx style="verb">
                                        "mo"|"tu"|"we"|"th"|"fr"|"sa"|"su"</spanx>.
                                    </t>
                                    <t>
                                        <spanx style="strong">nthOfPeriod</spanx>: <spanx style="verb">Number</spanx>(optional)
                                        If present, rather than representing every Friday (for example), it represents
                                        only a specific instance within the period (month for monthly recurrences, year
                                        for yearly recurrences). Must be a non-zero integer, negative integers means
                                        nth-last of period. This is the <spanx style="verb">"+1"</spanx> or <spanx
                                            style="verb">"-3"
                                    </spanx> etc. prefix from the BYDAY values in iCal.
                                    </t>

                                </list>

                            </t>
                            <t>
                                <spanx style="strong">byDate</spanx>: <spanx style="verb">Number[]</spanx>(optional)
                                The BYMONTHDAY part from iCalendar. The array MUST have at least one entry if included.

                            </t>
                            <t>
                                <spanx style="strong">byMonth</spanx>: <spanx style="verb">String[]</spanx>(optional)
                                The BYMONTH part from iCalendar. Each entry is a string representation of a number,
                                starting from <spanx style="verb">1</spanx> for the first month in the calendar (e.g. <spanx
                                    style="verb">"1"
                            </spanx> means <spanx style="verb">"January"</spanx> with Gregorian calendar), with an
                                optional <spanx style="verb">"L"</spanx> suffix (see <xref target="RFC7529"/>) for
                                leap months (this MUST be upper-case, e.g. <spanx style="verb">"3L"</spanx>).
                                The array MUST have at least one entry if included.

                            </t>
                            <t>
                                <spanx style="strong">byYearDay</spanx>: <spanx style="verb">Number[]</spanx>(optional)
                                The BYYEARDAY part from iCalendar. The array MUST have at least one entry if included.

                            </t>
                            <t>
                                <spanx style="strong">byWeekNo</spanx>: <spanx style="verb">Number[]</spanx>(optional)
                                The BYWEEKNO part from iCalendar. The array MUST have at least one entry if included.

                            </t>
                            <t>
                                <spanx style="strong">byHour</spanx>: <spanx style="verb">Number[]</spanx>(optional)
                                The BYHOUR part from iCalendar. The array MUST have at least one entry if included.

                            </t>
                            <t>
                                <spanx style="strong">byMinute</spanx>: <spanx style="verb">Number[]</spanx>(optional)
                                The BYMINUTE part from iCalendar. The array MUST have at least one entry if included.

                            </t>
                            <t>
                                <spanx style="strong">bySecond</spanx>: <spanx style="verb">Number[]</spanx>(optional)
                                The BYSECOND part from iCalendar. The array MUST have at least one entry if included.

                            </t>
                            <t>
                                <spanx style="strong">count</spanx>: <spanx style="verb">Number</spanx>(optional)
                                The COUNT part from iCalendar. This MUST NOT be included if an
                                <spanx style="strong">until</spanx> property is specified.

                            </t>
                            <t>
                                <spanx style="strong">until</spanx>: <spanx style="verb">LocalDate</spanx>(optional)
                                The UNTIL part from iCalendar. This MUST NOT be included if a
                                <spanx style="strong">count</spanx> property is specified. Note, as in iCalendar, this
                                date is presumed to be in the timezone specified in
                                <spanx style="strong">timeZone</spanx>. It is not a UTC time.

                            </t>
                        </list>

                    </t>
                </section>

                <section anchor="recurrenceOverrides" title="recurrenceOverrides">
                    <t>
                        Type:
                        <spanx style="verb">LocalDate[PatchObject|null]|null</spanx>
                    </t>
                    <t>
                        The object is a map of the Recurrence-Id (i.e. the date-time of the start of the occurrence) to
                        either <spanx style="verb">null</spanx>, to indicate the occurrence should be deleted, or an
                        object of patches to apply to the generated occurrence object.
                    </t>
                    <t>
                        If the Recurrence-Id does not match an expanded start date from a recurrence rule, it is to be
                        treated as an additional occurrence (like an RDATE from iCalendar). The patch object may often
                        be empty in this case.
                    </t>
                    <t>
                        By default, an occurrence inherits all properties from the main event except the start (or due)
                        date-time, which is shifted to the new start time. However, individual properties of the
                        occurrence can be modified by a patch, or multiple patches.
                    </t>
                    <t>
                        A pointer in the PatchObject MUST NOT start with one of the following prefixes; any patch with
                        such a key MUST be ignored:
                        <list style="symbols">
                            <t>
                                uid
                            </t>
                            <t>
                                relatedTo
                            </t>
                            <t>
                                prodId
                            </t>
                            <t>
                                method
                            </t>
                            <t>
                                isAllDay
                            </t>
                            <t>
                                recurrenceRule
                            </t>
                            <t>
                                recurrenceOverrides
                            </t>
                            <t>
                                replyTo
                            </t>
                        </list>
                    </t>
                </section>
            </section>

            <section anchor="whatwhere-properties" title="What and where properties">

                <section anchor="title" title="title">
                    <t>
                        Type: <spanx style="verb">String</spanx> (Defaults to the empty string if omitted)
                    </t>
                    <t>
                        A short summary of the object.
                    </t>
                </section>

                <section anchor="description" title="description">
                    <t>
                        Type: <spanx style="verb">String</spanx> (Defaults to the empty string if omitted)
                    </t>
                    <t>
                        A longer form description of the object. This is plain text, but a client SHOULD attempt to
                        hyperlink URLs when displaying it.
                    </t>
                </section>

                <section anchor="locations" title="locations">
                    <t>
                        Type:
                        <spanx style="verb">String[Location]|null</spanx>
                    </t>
                    <t>
                        A map of of location id to Location objects, representing locations associated with the object.
                        A location id may be any string and need only be unique to this object, although a UUID is a
                        practical choice.
                    </t>
                    <t>
                        A <spanx style="strong">Location</spanx> object has the following properties. All properties are
                        optional, but every Location object MUST have at least one property:
                    </t>
                    <t>
                        <list style="symbols">
                            <t>
                                <spanx style="strong">name</spanx>:
                                <spanx style="verb">String</spanx>
                                The human-readable name of the location.

                            </t>
                            <t>
                                <spanx style="strong">description</spanx>:
                                <spanx style="verb">String</spanx>
                                Human-readable instructions for accessing this location. This may be an address, set of
                                directions, door access code, etc.

                            </t>
                            <t>
                                <spanx style="strong">rel</spanx>:
                                <spanx style="verb">String</spanx>
                                The relation type of this location to the JSCalendar object.
                                <vspace blankLines="1"/>
                                This MUST be either one of the following values, registered in a future RFC, or a
                                vendor-specific value. Any value the client or server doesn't understand should be
                                treated the same as <spanx style="verb">unknown</spanx>.
                                <list style="symbols">
                                    <t>
                                        <spanx style="verb">start</spanx>: The JSCalendar object starts at this
                                        location.
                                    </t>
                                    <t>
                                        <spanx style="verb">end</spanx>: The JSCalendar object ends at this location.
                                    </t>
                                    <t>
                                        <spanx style="verb">virtual</spanx>: This is not a physical location (e.g. this
                                        location is an online chat room where people will meet).
                                    </t>
                                    <t>
                                        <spanx style="verb">unknown</spanx>: The relation of this location to the event
                                        is unknown.
                                    </t>
                                </list>

                            </t>
                            <t>
                                <spanx style="strong">features</spanx>:
                                <spanx style="verb">String[]|null</spanx>
                                The features supported by this location.
                                <vspace blankLines="1"/>
                                The strings in the array MUST each be either one of the following values, registered in
                                a future RFC, or a vendor-specific value. Any value the client or server doesn't
                                understand should be ignored, but preserved.
                                <vspace blankLines="1"/>
                                The features supported by locations with rel-type <spanx style="verb">virtual</spanx> are:
                                <list style="symbols">
                                    <t>
                                        <spanx style="verb">audio</spanx>: audio conferencing
                                    </t>
                                    <t>
                                        <spanx style="verb">chat</spanx>: chat or instant messaging
                                    </t>
                                    <t>
                                        <spanx style="verb">screen</spanx>: screen sharing
                                    </t>
                                    <t>
                                        <spanx style="verb">video</spanx>: video conferencing
                                    </t>
                                    <t>
                                        any vendor-prefixed custom value
                                    </t>
                                </list>
                            </t>
                            <t>
                                <spanx style="strong">timeZone</spanx>:
                                <spanx style="verb">String</spanx>
                                A time zone for this location.
                                <vspace blankLines="1"/>
                                If omitted, the <spanx style="strong">timeZone</spanx> from the
                                JSCalendar object MUST be presumed when a time zone is needed in
                                relation to this location.
                            </t>
                            <t>
                                <spanx style="strong">coordinates</spanx>:
                                <spanx style="verb">String</spanx>
                                An
                                <xref target="RFC5870"/>
                                <spanx style="verb">geo:</spanx>
                                URI for the location.

                            </t>
                            <t>
                                <spanx style="strong">uri</spanx>:
                                <spanx style="verb">String</spanx>
                                A URI that represents how to connect to this location.
                                <vspace blankLines="1"/>
                                This may be a telephone number (represented as <spanx style="verb">
                                tel:+1-555-555-555</spanx>) for a teleconference, a web address for online chat, or a
                                custom URI for something like Skype (e.g. <spanx style="verb">skype:username</spanx>).

                            </t>
                            <t>
                                <spanx style="strong">linkIds</spanx>:
                                <spanx style="verb">String[]|null</spanx>
                                A list of ids for links to alternate representations of this location.
                                <vspace blankLines="1"/>
                                For example, an alternative representation could be in vCard format. If a given value
                                does not correspond to any link id in the links property of the instance, this MUST be
                                ignored.

                            </t>
                        </list>
                    </t>
                </section>

                <section anchor="links" title="links">
                    <t>
                        Type:
                        <spanx style="verb">String[Link]|null</spanx>
                    </t>
                    <t>
                        A map of of link id to Link objects, representing external resources associated with the object.
                        A link id may be any string and need only be unique to this object, although the href or a UUID
                        are practical choices.
                    </t>

                    <t>
                        A <spanx style="strong">Link</spanx> object has the following properties:
                    </t>
                    <t>
                        <list style="symbols">
                            <t>
                                <spanx style="strong">href</spanx>:
                                <spanx style="verb">String</spanx>
                                A URI from which the resource may be fetched.
                                <vspace blankLines="1"/>
                                This MAY be a <spanx style="verb">data:</spanx> URL, but it is recommended that the file
                                be hosted on a server to avoid embedding arbitrary large data in JSCalendar
                                object instances.
                            </t>
                            <t>
                                <spanx style="strong">type</spanx>: <spanx style="verb">String|null</spanx>(optional,
                                defaults to <spanx style="verb">null</spanx>)
                                The <xref target="RFC6838">content-type</xref> of the resource, if known.

                            </t>
                            <t>
                                <spanx style="strong">size</spanx>: <spanx style="verb">Number|null</spanx>(optional,
                                defaults to <spanx style="verb">null</spanx>)
                                The size, in bytes, of the resource when fully decoded (i.e. the number of bytes in the
                                file the user would download), if known.

                            </t>
                            <t>
                                <spanx style="strong">rel</spanx>: <spanx style="verb">String</spanx>(optional, defaults
                                to <spanx style="verb">related</spanx>)
                                Identifies the relation of the linked resource to the object. The value MUST be a
                                registered relation type (see<xref target="RFC5988"/>).
                                <vspace blankLines="1"/>
                                The features supported by locations with rel-type <spanx style="verb">virtual</spanx> are:
                                <vspace blankLines="1"/>
                                Links with a rel of <spanx style="verb">enclosure</spanx> SHOULD be considered by the
                                client as attachments for download.
                                <vspace blankLines="1"/>
                                Links with a rel of <spanx style="verb">describedby</spanx> SHOULD be considered by the
                                client to be an alternate representation of the description, for example an HTML page
                                describing the object.
                                <vspace blankLines="1"/>
                                Links with a rel of <spanx style="verb">icon</spanx> SHOULD be considered by the client
                                to be an image that it MAY use when presenting the calendar data to a user. The
                                properties object of this link MAY include a display property indicating the intended
                                purpose of this image. If included, the value MUST be either one of the following
                                values, registered in a future RFC, or a vendor-specific value.
                                <list style="symbols">
                                    <t>
                                        <spanx style="verb">badge</spanx>: an image inline with the title of the object
                                    </t>
                                    <t>
                                        <spanx style="verb">graphic</spanx>: a full image replacement for the object
                                        itself
                                    </t>
                                    <t>
                                        <spanx style="verb">fullsize</spanx>: an image that is used to enhance the
                                        object
                                    </t>
                                    <t>
                                        <spanx style="verb">thumbnail</spanx>: a smaller variant of <spanx style="verb">
                                        fullsize
                                    </spanx> to be used when space for the image is constrained
                                    </t>
                                </list>
                            </t>
                            <t>
                                <spanx style="strong">title</spanx>: <spanx style="verb">String|null</spanx>(optional,
                                defaults to <spanx style="verb">null</spanx>)
                                A human-readable description of the resource.

                            </t>
                            <t>
                                <spanx style="strong">properties</spanx>: <spanx style="verb">
                                String[String|null]|null</spanx>(optional, defaults to <spanx style="verb">null</spanx>)
                                Extra metadata stored by a client about a link.
                                <vspace blankLines="1"/>
                                The keys are as defined in this document, as defined in a future RFC, or URIs that
                                should be owned by the client author to avoid conflicts.

                            </t>
                        </list>
                    </t>
                </section>

                <section anchor="locale" title="locale">
                    <t>
                        Type:
                        <spanx style="verb">String|null</spanx>
                    </t>
                    <t>
                        The
                        <xref target="RFC5646"/>
                        language tag that best describes the locale used for the event, if known.
                    </t>
                </section>

                <section anchor="localizations" title="localizations">
                    <t>
                        Type:
                        <spanx style="verb">String[PatchObject]|null</spanx>
                    </t>
                    <t>
                        A map of
                        <xref target="RFC5646"/>
                        language tag to a patch object which localises the event into that locale.
                    </t>
                    <t>See the description of <xref target="patchobject-type">PatchObject</xref> for the
                        structure of the PatchObject. The patches are applied to the top-level object. In addition to
                        all the restrictions on patches specified there, the pointer also MUST NOT start with one of the
                        following prefixes; any patch with a such a key MUST be ignored:
                        <list style="symbols">
                            <t>sequence
                            </t>
                            <t>
                                localization
                            </t>
                            <t>start
                            </t>
                            <t>
                                timeZone
                            </t>
                            <t>
                                duration
                            </t>
                            <t>status</t>
                            <t>
                                freeBusyStatus
                            </t>
                            <t>
                                participants
                            </t>
                            <t>
                                useDefaultAlerts
                            </t>
                        </list>
                    </t>
                </section>

                <section anchor="keywords" title="keywords">
                    <t>
                        Type:
                        <spanx style="verb">String[]|null</spanx>
                    </t>
                    <t>
                        A list of keywords or tags related to the object. The values are free-form
                        and do not have to follow any particular structure.
                    </t>
                </section>

                <section anchor="categories" title="categories">
                    <t>
                        Type:
                        <spanx style="verb">String[]|null</spanx>
                    </t>
                    <t>
                        Specifies the categories related to the calendar object. Array values MUST be URIs.
                        In contrast to <xref target="keywords">keywords</xref>, categories typically
                        are structured.
                        <vspace blankLines="1"/>
                        For example, a vendor owning the domain <spanx style="verb">example.com</spanx>
                        might define the categories
                        <spanx style="verb">http://example.com/categories/sports/american-football"</spanx>
                        and <spanx style="verb">http://example.com/categories/music/r-b</spanx>.
                    </t>
                </section>

                <section anchor="color" title="color">
                    <t>
                        Type:
                        <spanx style="verb">String</spanx>
                    </t>
                    <t>Specifies a color clients MAY use when displaying this event. The value is a case-insensitive
                        color name taken from the CSS3 set of names, defined in Section 4.3 of <eref
                                target="https://www.w3.org/TR/2011/REC-css3-color-20110607/#svg-color">
                            W3C.REC-css3-color-20110607</eref> or a CSS3 RGB color hex value.
                        It is not intended that clients necessarily use the exact RGB value, but
                        rather that they find a suitable color that works in the given UA context.
                    </t>
                </section>

            </section>

            <section anchor="sharing-scheduling-properties" title="Sharing and scheduling properties">

                <section anchor="priority" title="priority">
                    <t>
                        Type: <spanx style="verb">Number</spanx>(defaults to <spanx style="verb">0</spanx> if omitted)
                    </t>
                    <t>Specifies a priority for the event. This may be used as part of scheduling systems to help
                        resolve conflicts for a time period.
                    </t>
                    <t>
                        The priority is specified as an integer in the range 0 to 9. A value of 0 specifies an undefined
                        priority. A value of 1 is the highest priority. A value of 2 is the second highest priority.
                        Subsequent numbers specify a decreasing ordinal priority. A value of 9 is the lowest priority.
                        Other integer values are reserved for future use.
                    </t>
                </section>

                <section anchor="freeBusyStatus" title="freeBusyStatus">
                    <t>
                        Type: <spanx style="verb">String</spanx>(defaults to <spanx style="verb">busy</spanx> if
                        omitted)
                    </t>
                    <t>Specifies how this property should be treated when calculating free-busy state. The value MUST be
                        one of:
                        <list style="symbols">
                            <t>
                                <spanx style="verb">"free"</spanx>: The object should be ignored when calculating
                                whether the user is busy.
                            </t>
                            <t>
                                <spanx style="verb">"busy"</spanx>: The object should be included when calculating
                                whether the user is busy.
                            </t>
                        </list>

                    </t>
                </section>

                <section anchor="privacy" title="privacy">
                    <t>
                        Type: <spanx style="verb">String</spanx>(defaults to <spanx style="verb">public</spanx> if
                        omitted)
                    </t>
                    <t>
                        Calendar objects are normally collected together and may be shared with other users. The privacy
                        property allows the object owner to indicate that it should not be shared, or should only have
                        the time information shared but the details withheld.
                    </t>
                    <t>
                        As JSCalendar is simply a data model, enforcement of the restrictions indicated by this property
                        are up to the implementations.
                    </t>
                    <t>
                        This property MUST NOT affect the information sent to scheduled participants; it is only
                        interpreted when the object is shared as part of a shared calendar.
                    </t>
                    <t>
                        The value MUST be either one of the following values, registered in a future RFC, or a
                        vendor-specific value. Vendor specific values MUST be prefixed with a domain name controlled by
                        the vendor, e.g. <spanx style="verb">fastmail.com/topsecret</spanx>. Any value the client or
                        server doesn't understand should be preserved but treated as equivalent to <spanx style="verb">
                        private</spanx>.
                        <list style="symbols">
                            <t>
                                <spanx style="verb">public</spanx>: The full details of the object are visible to those
                                whom the object's calendar is shared with.
                            </t>
                            <t>
                                <spanx style="verb">private</spanx>: The details of the object are hidden; only the
                                basic time and metadata is shared. Implementations MUST ensure the following
                                properties are stripped when the object is accessed by a sharee:
                                <list style="symbols">
                                    <t>
                                        title
                                    </t>
                                    <t>
                                        description
                                    </t>
                                    <t>
                                        locations
                                    </t>
                                    <t>
                                        links
                                    </t>
                                    <t>
                                        locale
                                    </t>
                                    <t>
                                        localizations
                                    </t>
                                    <t>
                                        participants
                                    </t>
                                    <t>
                                        replyTo
                                    </t>
                                </list>
                                In addition, any patches in <spanx style="verb">recurrenceOverrides</spanx> whose key is
                                prefixed with one of the above properties MUST be stripped.

                            </t>
                            <t>
                                <spanx style="verb">secret</spanx>: The object is hidden completely (as though it did
                                not exist) when the calendar is shared.
                            </t>
                        </list>

                    </t>
                </section>

                <section anchor="replyTo" title="replyTo">
                    <t>
                        Type:
                        <spanx style="verb">String[String]|null</spanx>
                    </t>
                    <t>
                        Represents methods by which a participant may RSVP to the organizer of the calendar object. The
                        keys in the property value are the available methods. The value is a URI to use that method.
                        Future methods may be defined in future specifications; a calendar client MUST just ignore any
                        method it does not understand.
                    </t>
                    <t>
                        The following methods are defined:
                        <list style="symbols">
                            <t>
                                <spanx style="verb">imip</spanx>: The organizer accepts an iMIP
                                <xref target="RFC6047"/>
                                response. The value MUST be a <spanx style="verb">mailto:</spanx> URI.
                            </t>
                            <t>
                                <spanx style="verb">web</spanx>: There is a web page where the user may submit an RSVP
                                using their browser. The value MUST be an <spanx style="verb">http:</spanx> or
                                <spanx style="verb">https:</spanx> URI.
                            </t>
                        </list>

                    </t>
                </section>

                <section anchor="participants" title="participants">
                    <t>
                        Type:
                        <spanx style="verb">String[Participant]|null</spanx>
                    </t>
                    <t>
                        A map of participant id to a participant describing their participation in the calendar object.
                        A participant id may be any string and need only be unique to this event; the email address of
                        the participant is a good choice.
                    </t>
                    <t>
                        A <spanx style="strong">Participant</spanx> object has the following properties. Properties are
                        mandatory unless marked otherwise:
                        <list style="symbols">
                            <t>
                                <spanx style="strong">name</spanx>: <spanx style="verb">String</spanx> The display name
                                of the participant (e.g. "Joe Bloggs").
                            </t>
                            <t>
                                <spanx style="strong">email</spanx>: <spanx style="verb">String</spanx> The email
                                address for the participant.
                            </t>
                            <t>
                                <spanx style="strong">kind</spanx>: <spanx style="verb">String</spanx>(optional,
                                defaults to <spanx style="verb">unknown</spanx>)
                                What kind of entity this participant is.
                                <vspace blankLines="1"/>
                                This MUST be either one of the following values, registered in a future RFC, or a
                                vendor-specific value. Any value the client or server doesn't understand should be
                                treated the same as <spanx style="verb">unknown</spanx>.
                                <list style="symbols">
                                    <t>
                                        <spanx style="verb">individual</spanx>: a single person
                                    </t>
                                    <t>
                                        <spanx style="verb">group</spanx>: a collection of people invited as a whole
                                    </t>
                                    <t>
                                        <spanx style="verb">resource</spanx>: a non-human resource, e.g. a projector
                                    </t>
                                    <t>
                                        <spanx style="verb">location</spanx>: a physical location involved in the event
                                        that needs to be scheduled, e.g. a conference room.
                                    </t>
                                    <t>
                                        <spanx style="verb">unknown</spanx>: no information is available about the kind
                                        of this participant.
                                    </t>
                                </list>
                            </t>

                            <t>
                                <spanx style="strong">roles</spanx>:
                                <spanx style="verb">String[]</spanx>
                                A list of roles that this participant fulfils.
                                <vspace blankLines="1"/>
                                At least one value MUST be specified for the participant. This MUST be either one of the
                                following values, registered in a future RFC, or a vendor-specific value.
                                Any value the client or server doesn't understand should be preserved but ignored.
                                <list style="symbols">
                                    <t>
                                        <spanx style="verb">owner</spanx>: The participant is an organizer of the event,
                                        and allowed to make alterations to any part of the event.
                                    </t>
                                    <t>
                                        <spanx style="verb">attendee</spanx>: The participant is an attendee of the
                                        event.
                                    </t>
                                    <t>
                                        <spanx style="verb">chair</spanx>: The participant is in charge of the event
                                        when it occurs.
                                    </t>
                                </list>

                            </t>
                            <t>
                                <spanx style="strong">locationId|null</spanx>: <spanx style="verb">String</spanx>(optional,
                                defaults to <spanx style="verb">null</spanx>)
                                The location at which this participant is expected to be attending.
                                <vspace blankLines="1"/>
                                If the value does not correspond to any location id in the locations property of the
                                instance, this MUST be treated the same as if the participant's locationId were
                                specified as null.

                            </t>
                            <t>
                                <spanx style="strong">rsvpResponse</spanx>: <spanx style="verb">String</spanx>(optional,
                                defaults to <spanx style="verb">needs-action</spanx>)
                                The RSVP response, if any, of this participant.
                                <vspace blankLines="1"/>
                                The value MUST be either one of the following values, registered in a future RFC, or a
                                vendor-specific value:
                                <list style="symbols">
                                    <t>
                                        <spanx style="verb">needs-action</spanx>: No status yet set by the participant.
                                    </t>
                                    <t>
                                        <spanx style="verb">accepted</spanx>: The participant will attend.
                                    </t>
                                    <t>
                                        <spanx style="verb">declined</spanx>: The participant may attend.
                                    </t>
                                    <t>
                                        <spanx style="verb">tentative</spanx>: The participant will not attend.
                                    </t>
                                </list>
                            </t>
                            <t>
                                <spanx style="strong">participation</spanx>: <spanx style="verb">String</spanx>(optional,
                                defaults to <spanx style="verb">required</spanx>)
                                The required attendance of this participant.
                                <vspace blankLines="1"/>
                                The value MUST be either one of the following values, registered in a future RFC, or a
                                vendor-specific value. Any value the client or server doesn't understand should be
                                treated the same as <spanx style="verb">required</spanx>.
                                <list style="symbols">
                                    <t>
                                        <spanx style="verb">non-participant</spanx>: Indicates a participant who is
                                        copied for information purposes only.
                                    </t>
                                    <t>
                                        <spanx style="verb">optional</spanx>: Indicates a participant whose
                                        participation is optional.
                                    </t>
                                    <t>
                                        <spanx style="verb">required</spanx>: Indicates a participant whose
                                        participation is required.
                                    </t>
                                </list>
                            </t>
                            <t>
                                <spanx style="strong">rsvpWanted</spanx>: <spanx style="verb">Boolean</spanx>(optional,
                                defaults to <spanx style="verb">false</spanx>)
                                If true, the organizer is expecting the participant to notify them of their status.
                            </t>
                            <t>
                                <spanx style="strong">scheduleSequence</spanx>: <spanx style="verb">Number</spanx>(optional,
                                defaults to <spanx style="verb">
                                0</spanx>)
                                The sequence number of the last response from the participant. If defined, this MUST be a non-negative integer.
                                <vspace blankLines="1"/>
                                This can be used to determine whether the partcipant has sent a new RSVP following
                                significant changes to the event, and to determine if future responses are responding to
                                a current or older view of the data.

                            </t>
                            <t>
                                <spanx style="strong">scheduleUpdated</spanx>: <spanx style="verb">UTCDate|null</spanx>(optional,
                                defaults to <spanx style="verb">null</spanx>)
                                The <spanx style="strong">updated</spanx> property of the last iMIP response from the
                                participant.
                                <vspace blankLines="1"/>
                                This can be compared to the <spanx style="strong">updated</spanx> timestamp in future iMIP
                                responses to determine if the response is older or newer than the current data.
                            </t>
                            <t>
                                <spanx style="strong">invitedBy</spanx>: <spanx style="verb">String|null</spanx>(optional,
                                defaults to <spanx style="verb">null</spanx>)
                                The participant id of the participant who invited this one, if known.

                            </t>
                            <t>
                                <spanx style="strong">delegatedTo</spanx>: <spanx style="verb">String[]|null</spanx>(optional,
                                defaults to <spanx style="verb">null</spanx>)
                                A list of participant ids of participants that this participant has delegated their
                                participation to.
                                This MUST be omitted if none (rather than an empty array).
                            </t>
                            <t>
                                <spanx style="strong">delegatedFrom</spanx>: <spanx style="verb">String[]|null</spanx>(optional,
                                defaults to <spanx style="verb">null</spanx>)
                                A list of participant ids that this participant is acting as a delegate for. This MUST
                                be omitted if none (rather than an empty array).
                            </t>
                            <t>
                                <spanx style="strong">memberOf</spanx>: <spanx style="verb">String[]|null</spanx>(optional,
                                defaults to <spanx style="verb">null</spanx>)
                                A list of group addresses that were invited to this calendar object, which caused this
                                participant to be invited due to their membership of the group(s). This MUST be omitted
                                if none (rather than an empty array).
                            </t>
                            <t>
                                <spanx style="strong">linkIds</spanx>: <spanx style="verb">String[]|null</spanx>(optional,
                                defaults to <spanx style="verb">null</spanx>)
                                Links to more information about this participant, for example in vCard format. If a
                                given value does not correspond to any link id in the links property of the instance,
                                this id MUST be ignored. This MUST be omitted if none (rather than an empty array).

                            </t>
                        </list>

                    </t>
                </section>
            </section>

            <section anchor="alerts-properties" title="Alerts properties">

                <section anchor="useDefaultAlerts" title="useDefaultAlerts">
                    <t>
                        Type: <spanx style="verb">Boolean</spanx> (defaults to <spanx style="verb">false</spanx> if
                        omitted)
                    </t>
                    <t>
                        If <spanx style="verb">true</spanx>, use the user's default alerts for this event and ignore the
                        <xref target="alerts"/>
                        property. Fetching user defaults is dependent on the API from which this JSCalendar object is
                        being fetched, and is not defined in this specification.
                    </t>
                </section>

                <section anchor="alerts" title="alerts">
                    <t>
                        Type:
                        <spanx style="verb">String[Alert]|null</spanx>
                    </t>
                    <t>
                        A map of of alert id to Alert objects, representing alerts/reminders to display or send the user
                        for this calendar object. An alert id may be any string and need only be unique to this calendar
                        object, although a UUID is a practical choice.
                    </t>
                    <t>
                        An <spanx style="strong">Alert</spanx> Object has the following properties:
                        <list style="symbols">
                            <t>
                                <spanx style="strong">relativeTo</spanx>: <spanx style="verb">String</spanx> (optional,
                                defaults to <spanx style="verb">before-start</spanx>)
                                Specifies where the offset is relative to for the alarm to trigger. The value MUST be
                                one of:
                                <list style="symbols">
                                    <t>
                                        <spanx style="verb">before-start</spanx>
                                    </t>
                                    <t>
                                        <spanx style="verb">after-start</spanx>
                                    </t>
                                    <t>
                                        <spanx style="verb">before-end</spanx>
                                    </t>
                                    <t>
                                        <spanx style="verb">after-end</spanx>
                                    </t>
                                </list>

                            </t>
                            <t>
                                <spanx style="strong">offset</spanx>:
                                <spanx style="verb">Duration</spanx>
                                The offset from the start and end/due of the calendar object to fire the alert.
                                If the calendar object does not define a time zone,
                                the user's default time zone SHOULD be used when determining the offset,
                                if known. Otherwise, the time zone to use is implementation specific.
                            </t>
                            <t>
                                <spanx style="strong">action</spanx>:
                                <spanx style="verb">DisplayAction|EmailAction|UnknownAction</spanx>
                                <vspace blankLines="1"/>
                                Describes how to alert the user.
                                <vspace blankLines="1"/>
                                A <spanx style="strong">DisplayAction</spanx> means a message (which is service dependent,
                                but SHOULD include the title and start or due time of the calendar object) SHOULD be
                                shown to the user on any client connected to this account at the specified time. How
                                this message is formatted (and any sound or other method of drawing the user's
                                attention) is client specific. It has the following properties:
                                <list style="symbols">
                                    <t>
                                        <spanx style="strong">type</spanx>: <spanx style="verb">String</spanx> The value
                                        MUST be <spanx style="verb">display</spanx>.
                                    </t>
                                    <t>
                                        <spanx style="strong">acknowledged</spanx>: <spanx style="verb">UTCDate|null
                                    </spanx> (optional)
                                        <vspace blankLines="1"/>
                                        When the user has permanently dismissed the alert the client MUST set this to
                                        the current time in UTC. Other clients which sync this property can then
                                        automatically dismiss or suppress duplicate alerts (alerts with the same alert
                                        id that triggered on or before this date-time).
                                        <vspace blankLines="1"/>
                                        For a recurring event, the <spanx style="strong">acknowledged</spanx> property of
                                        the parent event MUST be updated, unless the alert is already overridden
                                        in <spanx style="strong">recurrenceOverrides</spanx>.

                                    </t>
                                    <t>
                                        <spanx style="strong">snoozed</spanx>: <spanx style="verb">UTCDate|null</spanx> (optional)
                                        <vspace blankLines="1"/>
                                        If the user temporarily dismisses the alert, this is the UTC date-time after
                                        which it should be reshown.
                                        Clients displaying this alert SHOULD hide it if the snoozed property is updated
                                        to a time in the future. When that time is reached, the alert SHOULD be reshown
                                        unless acknowledged is now after the original trigger time.
                                        <vspace blankLines="1"/>
                                        Setting this property on an instance of a recurring event MUST update the alarm
                                        on the master event, unless the respective instance already is defined in
                                        <spanx style="verb">recurrenceOverrides</spanx>. It MUST NOT generate an override
                                        for the sole use of snoozing an alarm.
                                    </t>
                                    <t>
                                        <spanx style="strong">audioLinkId</spanx>: <spanx style="verb">String|null
                                    </spanx> (optional)
                                        <vspace blankLines="1"/>
                                        The id of a link in the
                                        <xref target="links"/>
                                        property. If the linked file is of an audio type understood by the client, the
                                        client SHOULD play this audio when triggering the alert.

                                    </t>
                                </list>
                                <vspace blankLines="1"/>
                                An <spanx style="strong">EmailAction</spanx> means an email SHOULD be sent as
                                specified in the object at the specified time. It has the following properties:
                                <list style="symbols">
                                    <t>
                                        <spanx style="strong">type</spanx>: <spanx style="verb">String</spanx> The value
                                        MUST be <spanx style="verb">email</spanx>.
                                    </t>
                                    <t>
                                        <spanx style="strong">to</spanx>: <spanx style="verb">Emailer[]</spanx> An array
                                        of name/email objects to send the alert to.
                                        <vspace blankLines="1"/>
                                        An <spanx style="strong">Emailer</spanx> object has the following properties:
                                        <list style="symbols">
                                            <t>
                                                name: String The name of the recipient. If not known, clients SHOULD use
                                                the empty string.
                                            </t>
                                            <t>
                                                email: String The email address of the recipient.
                                            </t>
                                        </list>

                                    </t>
                                    <t>
                                        <spanx style="strong">subject</spanx>: <spanx style="verb">String</spanx> (optional)
                                        The subject to use for the email. If omitted, this is implementation specific,
                                        but the server SHOULD try to choose an appropriate subject (such as "Event
                                        Summary: starting in 5 min").
                                    </t>
                                    <t>
                                        <spanx style="strong">textBody</spanx>: <spanx style="verb">String</spanx> (optional)
                                        The plain-text body to use for the email. If omitted, the body of the email is
                                        implementation specific, but the server SHOULD include all pertinent details
                                        about the event, such as summary, location and start time.
                                    </t>
                                </list>
                                <vspace blankLines="1"/>
                                An <spanx style="strong">UnknownAction</spanx> object is an object that contains a <spanx
                                    style="emph">type
                            </spanx> property whose value is not <spanx style="verb">email</spanx> or <spanx
                                    style="verb">string</spanx>, plus zero or more other properties. This is for
                                compatibility with client extensions and future RFCs. The client or server SHOULD NOT
                                trigger any type of alert for action types they do not understand, but MUST preserve
                                them.

                            </t>
                        </list>

                    </t>
                </section>

            </section>
        </section>

        <section anchor="jscalendar-objects" title="JSCalendar objects">
            <section anchor="jsevent" title="JSEvent">
                <t>
                    MIME type: <spanx style="verb">application/calendar+json;type=jsevent</spanx>
                </t>
                <t>
                    A JSEvent represents a scheduled amount of time on a calendar, typically a meeting, appointment,
                    reminder or anniversary. Multiple participants may partake in the event at multiple locations.
                </t>
                <t>
                    A JSEvent <xref target="type">@type</xref> property value MUST be <spanx style="verb">jsevent</spanx>.

                </t>
                <t>
                    In addition to the common JSCalendar object <xref target="jscalendar-props">properties</xref> a
                    JSEvent
                    has the following properties:
                </t>

                <section anchor="start" title="start">
                    <t>
                        Type: <spanx style="verb">LocalDate</spanx> e.g.
                        <spanx style="verb">2015-09-02T00:00:00</spanx>
                    </t>
                    <t>
                        The date/time the event would start in the event's time zone.
                    </t>
                    <t>
                        A valid JSEvent MUST include this property.
                    </t>
                </section>

                <section anchor="timeZone" title="timeZone">
                    <t>
                        Type:
                        <spanx style="verb">String|null</spanx>
                    </t>
                    <t>
                        The <eref target="http://www.iana.org/time-zones">IANA Time Zone Database</eref> name for the
                        time zone the event is scheduled in, or <spanx style="verb">null</spanx> for floating time. If
                        omitted, this MUST be presumed to be <spanx style="verb">null</spanx> (i.e. floating time).
                    </t>
                </section>

                <section anchor="duration" title="duration">
                    <t>
                        Type: <spanx style="verb">Duration</spanx>, e.g. <spanx style="verb">P2DT3H</spanx>
                        (Defaults to <spanx style="verb">P0D</spanx> if omitted)
                    </t>
                    <t>
                        The zero or positive duration of the event in absolute time (i.e. in UTC time; ignoring DST shifts).
                        To get the end date in the event time zone, convert start into UTC, then add the duration,
                        then convert the result into the appropriate time zone.
                    </t>
                    <t>
                        A JSEvent MAY be end in a different timezone (e.g. a plane flight crossing
                        timezones). In this case, the JSEvent MUST specify the end timezone in a
                        <spanx style="strong">location</spanx> property value that defines its
                        <spanx style="strong">rel</spanx> to be <spanx style="verb">end</spanx> and
                        the end timezone in its <spanx style="strong">timeZone</spanx> property.
                    </t>
                </section>

                <section anchor="isAllDay" title="isAllDay">
                    <t>
                        Type: <spanx style="verb">Boolean</spanx>
                        (optional, defaults to <spanx style="verb">false</spanx>)
                    </t>
                    <t>
                        Specifies if the event an all day event, such as a birthday or public holiday.
                    </t>
                    <t>
                        If <spanx style="strong">isAllDay</spanx> is true, then the following restrictions apply:
                        <list style="symbols">
                            <t>
                                the <spanx style="strong">start</spanx> property
                                MUST have a time component of <spanx style="verb">T00:00:00</spanx>.
                            </t>
                            <t>
                                the <spanx style="strong">duration</spanx> property MUST only include a day
                                component.
                            </t>
                          </list>
                          Note that all-day events MAY be bound to a specific time zone, as defined by
                          the <spanx style="strong">timeZone</spanx> property.
                    </t>
                </section>
                <section anchor="sharing-scheduling-status-jsevent" title="status">
                    <t>
                        Type: <spanx style="verb">String</spanx>
                    </t>
                    <t>
                        The scheduling status (<xref target="sharing-scheduling-properties"/>) of a JSEvent
                        defaults to <spanx style="verb">confirmed</spanx> if omitted.
                    </t>
                    <t>
                        If set, it MUST be one of:
                        <list style="symbols">
                            <t>
                                <spanx style="verb">confirmed</spanx>: Indicates the event is definite.
                            </t>
                            <t>
                                <spanx style="verb">cancelled</spanx>: Indicates the event is cancelled.
                            </t>
                            <t>
                                <spanx style="verb">tentative</spanx>: Indicates the event is tentative.
                            </t>
                        </list>
                    </t>
                </section>

            </section>

            <section anchor="jstask" title="JSTask">
                <t>
                    MIME type: <spanx style="verb">application/calendar+json;type=jstask</spanx>
                </t>
                <t>
                    A JSTask represents an action-item, assignment, to-do or work item .
                </t>
                <t>
                    A  JSTask <xref target="type">@type</xref> property value MUST be <spanx style="verb">jstask</spanx>.

                </t>
                <t>
                    A JSTask may start and be due at certain points in time, may take some estimated time to complete
                    and may recur; none of which is required. This notably differs from <xref target="jsevent">
                    JSEvent</xref> which is required to start at a certain point in time and typically takes some
                    non-zero duration to complete.
                </t>
                <t>
                    In addition to the common JSCalendar object <xref target="jscalendar-props">properties</xref> a
                    JSTask has the following properties:
                </t>

                <section anchor="due-task" title="due">
                    <t>
                        Type: <spanx style="verb">LocalDate|null</spanx> e.g.
                        <spanx style="verb">2015-09-02T00:00:00</spanx>
                    </t>
                    <t>
                        The date/time the task is due in the task's time zone.
                    </t>
                </section>
                <section anchor="start-task" title="start">
                    <t>
                        Type: <spanx style="verb">LocalDate|null</spanx> e.g.
                        <spanx style="verb">2015-09-02T00:00:00</spanx>
                    </t>
                    <t>
                        The date/time the task should start in the task's time zone.
                    </t>
                </section>
                <section anchor="timeZone-task" title="timeZone">
                    <t>
                        Type:
                        <spanx style="verb">String|null</spanx>
                    </t>
                    <t>
                        The IANA Time Zone Database name for the
                        time zone the task is scheduled in, or <spanx style="verb">null</spanx> for floating time. If
                        omitted, this MUST be presumed to be <spanx style="verb">null</spanx> (i.e. floating time).
                    </t>
                </section>

                <section anchor="estimatedDuration" title="estimatedDuration">
                    <t>
                        Type: <spanx style="verb">Duration|null</spanx>, e.g.
                        <spanx style="verb">P2DT3H</spanx>
                    </t>
                    <t>Specifies the estimated positive duration of time the task takes to complete.
                    </t>
                    <t>
                        If the <spanx style="strong">start</spanx> and <spanx style="strong">due</spanx> properties are
                        set, the estimated duration SHOULD be less than or equal to the time interval between these
                        properties.
                    </t>
                </section>
                <section anchor="completed" title="completed">
                    <t>
                        Type: <spanx style="verb">UTCDate|null</spanx>, e.g.
                        <spanx style="verb">2016-06-13T12:00:00Z</spanx>
                    </t>
                    <t>Specifies the date/time the task was completed.
                    </t>
                    <t>
                        If the task is recurring and has future instances, a client may want to denote a specific
                        task recurrence as completed but leave other instances as uncompleted. One way to achieve
                        this is by overriding the completed property in the task
                        <xref target="recurrenceOverrides">recurrence overrides</xref>.
                        However, this could produce a long list of completion times for regularly recurring tasks. An
                        alternative approach is to split the JSTask into a current, single instance of JSTask with this
                        instance completion time and a future recurring instance. Also see the definition of the
                        <xref target="relatedTo">relatedTo</xref> property <xref target="relatedTo"/> on splitting.
                    </t>
                </section>

                <section anchor="isAllDay-task" title="isAllDay">
                    <t>
                        Type: <spanx style="verb">Boolean</spanx>
                        (optional, defaults to <spanx style="verb">false</spanx>)
                    </t>
                    <t>
                        Specifies if the task is an all day task.
                    </t>
                    <t>
                        If <spanx style="strong">isAllDay</spanx> is true, then the following restrictions apply:
                        <list style="symbols">
                            <t>
                                the <spanx style="strong">start</spanx> and <spanx style="strong">due</spanx> properties
                                MUST have a time component of <spanx style="verb">T00:00:00</spanx>.
                            </t>
                            <t>
                                the <spanx style="strong">duration</spanx> and
                                <spanx style="strong">estimatedDuration</spanx> properties MUST only include a day
                                component.
                            </t>
                        </list>
                          Note that all-day tasks MAY be bound to a specific time zone, as defined by
                          the <spanx style="strong">timeZone</spanx> property.
                    </t>
                </section>

                <section anchor="progress-participant-task" title="progress">
                    <t>
                        In addition to the common properties of a <spanx style="strong">Participant</spanx>
                        object (<xref target="participants"/>), a Participant within a JSTask supports the  following property:
                        <list style="symbols">
                            <t>
                                <spanx style="strong">progress</spanx>:
                                <spanx style="verb">ParticipantProgress|null</spanx> The progress of the participant for this task, if known.
                            </t>
                        </list>
                        <vspace blankLines="1"/>
                        A <spanx style="strong">ParticipantProgress</spanx> object has the following properties:
                        <vspace blankLines="1"/>
                        <list style="symbols">
                            <t>
                                <spanx style="strong">status</spanx>: <spanx style="verb">String</spanx> Describes
                                the completion status of the participant's progress.
                                <vspace blankLines="1"/>
                                The value MUST  be at most one of the following values,
                                registered in a future RFC, or a vendor-specific value:
                                <list style="symbols">
                                    <t>
                                        <spanx style="verb">completed</spanx>: The participant completed her part of the task.
                                    </t>
                                    <t>
                                        <spanx style="verb">in-process</spanx>: The participant is in process of completing her part of the task.
                                    </t>
                                </list>
                            </t>
                            <t>
                                <spanx style="strong">timestamp</spanx>: <spanx style="verb">UTCDate</spanx> Describes
                                the latest time when the participant updated her progress.
                            </t>
                        </list>
                    </t>
                </section>

                <section anchor="sharing-scheduling-status-jstask" title="status">
                    <t>
                        Type: <spanx style="verb">String</spanx>
                    </t>
                    <t>
                        The scheduling status (<xref target="sharing-scheduling-properties"/>) of a JSTask
                        defaults to <spanx style="verb">needs-action</spanx> if omitted.
                    </t>
                    <t>
                        If set, it MUST be one of:
                        <list style="symbols">
                            <t>
                                <spanx style="verb">needs-action</spanx>: Indicates the task needs action.
                            </t>
                            <t>
                                <spanx style="verb">completed</spanx>: Indicates the task is completed.
                                If this value is set, then the timestamp in the <spanx style="verb">completed</spanx>
                                property (<xref target="completed"/>) MUST NOT be null.
                            </t>
                            <t>
                                <spanx style="verb">in-process</spanx>: Indicates the task is in process.
                            </t>
                            <t>
                                <spanx style="verb">cancelled</spanx>: Indicates the task is cancelled.
                            </t>
                        </list>
                    </t>
                </section>

            </section>

            <section anchor="jsgroup" title="JSGroup">
                <t>
                    MIME type: <spanx style="verb">application/calendar+json;type=jsgroup</spanx>
                </t>
                <t>
                    A JSGroup is a collection of <xref target="jsevent">JSEvent</xref> and
                    <xref target="jstask">JSTask</xref> objects. Typically, objects are grouped by topic
                    (e.g. by keywords) or calendar membership.
                </t>
                <t>
                    Its <xref target="type">@type</xref> property value MUST be <spanx style="verb">jsgroup</spanx>.
                </t>
                <t>
                    JSGroup supports the following <xref target="jscalendar-props">JSCalendar properties</xref>:
                    <list style="symbols">
                        <t>
                            @type
                        </t>
                        <t>
                            uid
                        </t>
                        <t>
                            created
                        </t>
                        <t>
                            updated
                        </t>
                        <t>
                            categories
                        </t>
                        <t>
                            keywords
                        </t>
                        <t>
                            name
                        </t>
                        <t>
                            description
                        </t>
                        <t>
                            color
                        </t>
                        <t>
                            links
                        </t>
                    </list>
                    as well as the following JSGroup-specific properties:
                </t>
                <section title="entries">
                    <t>
                        Type: <spanx style="verb">(JSTask|JSEvent)[]|null</spanx>
                    </t>
                    <t>
                        A list of group members. The list MAY contain multiple object types and
                        implementations MUST ignore entries of unknown type. The property value MUST either be
                        <spanx style="verb">null</spanx> or the list MUST NOT be empty.
                    </t>
                </section>
                <section title="source">
                    <t>
                        Type: <spanx style="verb">String|null</spanx>
                        (optional, default is <spanx style="verb">null</spanx>)
                    </t>
                    <t>
                        The source from which updated versions of this group may be retrieved from.
                        If the value is not <spanx style="verb">null</spanx>, it MUST be a URI.
                    </t>
                </section>
            </section>
        </section>

        <section anchor="icalendar-translation" title="Conversion from and to iCalendar">
            <t>
                This section specifies which JSCalendar properties can be mapped from and to iCalendar
                format. Implementations SHOULD follow these conversion guidelines. Still, JSCalendar does not restrict
                itself to iCalendar and conversion between these two formats MAY be lossy.
            </t>
            <section anchor="translate-jsevent" title="JSEvent">
                <t>
                    The iCalendar counterpart to <spanx style="strong">JSEvent</spanx> is the VEVENT component type
                    <xref target="RFC5545"/>. A VEVENT component that is a direct child of a VCALENDAR component is
                    equivalent to a standalone JSEvent. A VEVENT component <spanx style="strong">within</spanx> a VEVENT
                    maps to the entries of
                    the JSEvent <spanx style="strong">recurrenceOverrides</spanx> property (see
                    <xref target="recurrenceOverrides"/>).
                </t>


                <texttable anchor="translate-jsevent-table" title="Translation between JSEvent and iCalendar">
                    <ttcol align='left'>Property</ttcol>
                    <ttcol align='left'>iCalendar counterpart</ttcol>

                    <c>isAllDay</c>
                    <c>
                        True, if the type of the DTSTART property in iCalendar is DATE. When translating from JSCalendar
                        the iCalendar DTSTART property is of DATE value type, if the <spanx style="strong">isAllDay</spanx>
                        property is set to true and the <spanx style="strong">timeZone</spanx> property is null.
                    </c>

                    <c>start</c>
                    <c>
                        Corresponds to the DTSTART property in iCalendar. Note that time zone information is stored separately in JSEvent.
                    </c>

                    <c>timeZone</c>
                    <c>
                        Corresponds to the TZID part of the DTSTART property in iCalendar.
                        If the event has a different end time zone to start time zone, this should be
                        added as a JSCalendar <spanx style="strong">location</spanx> with just a
                        <spanx style="strong">timeZone</spanx> property and <spanx style="verb">rel="end"</spanx>.
                    </c>

                    <c>duration</c>
                    <c>
                        Corresponds to the DURATION or DSTART+DTEND properties in iCalendar.
                      </c>
                </texttable>

            </section>

            <section anchor="translate-jstask" title="JSTask">
                <t>
                    The iCalendar counterpart to <spanx style="strong">JSTask</spanx> is the VTODO component type
                    <xref target="RFC5545"/>. A VTODO component that is a direct child of a VCALENDAR component is
                    equivalent to a standalone JSTask. A VTODO component <spanx style="strong">within</spanx> a master
                    VTODO maps to the entries of
                    the JSTask <spanx style="strong">recurrenceOverrides</spanx> property (see
                    <xref target="recurrenceOverrides"/>).
                </t>

                <texttable anchor="translate-jstask-table" title="Translation between JSTask and iCalendar">
                <ttcol align='left'>Property</ttcol>
                <ttcol align='left'>iCalendar counterpart</ttcol>

                    <c>isAllDay</c>
                    <c>
                        True, if the type of the DTSTART property in iCalendar is DATE. When translating from JSCalendar
                        the iCalendar DTSTART property is of DATE value type, if the <spanx style="strong">isAllDay</spanx>
                        property is set to true and the <spanx style="strong">timeZone</spanx> property is null.
                    </c>

                    <c>due</c>
                    <c>
                        Corresponds to the DUE and DTSTART+DURATION properties in iCalendar. When mapping iCalendar
                        VTODOs with DTSTART+DURATION, the due date is the result of adding DURATION to DTSTART in the
                        DTSTART timezone.
                    </c>

                    <c>start</c>
                    <c>
                        Corresponds to the DTSTART property in iCalendar.
                    </c>

                    <c>timeZone</c>
                    <c>
                        Corresponds to the TZID part of the DTSTART/DUE properties in iCalendar.
                        If the task has a different end time zone to start or due time zone, this should be
                        added as a JSCalendar <spanx style="strong">location</spanx> with just a
                        <spanx style="strong">timeZone</spanx> property and <spanx style="verb">rel="end"</spanx>.
                    </c>

                    <c>estimatedDuration</c>
                    <c>
                        Corresponds to the ESTIMATED-DURATION iCalendar
                        property.
                        <spanx style="strong">NON-STANDARD</spanx>: this property is currently non-standard,
                        see <xref target="draft-apthorp-ical-tasks"/>.
                    </c>

                    <c>completed</c>
                    <c>
                        Maps to the COMPLETED iCalendar property.
                    </c>

                    <c>progress</c>
                    <c>
                        Corresponds to the PARTSTAT and COMPLETED properties in iCalendar.
                    </c>

                </texttable>
            </section>

            <section title="JSGroup">
                <t>
                    A JSGroup converts to a iCalendar VCALENDAR containing VEVENT or VTODO components.
                </t>

                <texttable anchor="translate-jsgroup-table" title="Translation between JSGroup and iCalendar">
                    <ttcol align='left'>Property</ttcol>
                    <ttcol align='left'>iCalendar counterpart</ttcol>

                    <c>entries</c>
                    <c>
                        The VEVENT and VTODO components within a top-level VCALENDAR component.
                    </c>

                    <c>source</c>
                    <c>
                        Corresponds to the SOURCE property in iCalendar.
                    </c>
                </texttable>
            </section>

            <section title="Common properties">
              <texttable anchor="translate-commonprops-table" title="Translation between JSCalendar and iCalendar">

                <ttcol align='left'>Property</ttcol>
                <ttcol align='left'>iCalendar counterpart</ttcol>

                    <c>alerts</c>
                    <c>
                        An <spanx style="strong">Alert</spanx> corresponds to the VALARM component in iCalendar, where
                        the <spanx style="strong">action</spanx> is determined by the iCalendar ACTION property value
                        (e.g., a <spanx style="verb">DISPLAY</spanx> property indicates that the JSCalendar Alert
                        action is a <spanx style="strong">DisplayAction</spanx> and similarly
                        an iCalendar <spanx style="verb">EMAIL</spanx> value for <spanx style="strong">EmailAction</spanx>
                        action).
                        The <spanx style="strong">relativeTo</spanx> and <spanx style="strong">offset</spanx> properties
                        corresponds to the iCalendar TRIGGER
                        property.

                        <spanx style="strong">NON-STANDARD</spanx>: The iCalendar properties for
                        JSCalendar Alert actions are non-standard, see
                        <xref target="draft-daboo-valarm-extensions"/>.
                    </c>

                    <c>categories</c>
                    <c>
                        Corresponds to the STRUCTURED-CATEGORY property in iCalendar,
                        see.
                        <spanx style="strong">NON-STANDARD</spanx>: this property is currently non-standard,
                        see <xref target="draft-ietf-calext-ical-relations"/>.
                    </c>

                    <c>created</c>
                    <c>
                        Corresponds to the CREATED property in iCalendar.
                    </c>

                    <c>description</c>
                    <c>
                        Corresponds to the DESCRIPTION property in iCalendar.
                    </c>

                    <c>freeBusyStatus</c>
                    <c>
                        Corresponds to the TRANSP property in iCalendar.
                    </c>

                    <c>keywords</c>
                    <c>
                        Corresponds to the COLOR property in iCalendar, as specified in <xref target="RFC7986"/>.
                    </c>

                    <c>links</c>
                    <c>
                        Corresponds to the ATTACH (<xref target="RFC5545"/>) and IMAGE iCalendar properties
                        (<xref target="RFC7986"/>).
                    </c>

                    <c>locale</c>
                    <c>
                        Corresponds to the LANGUAGE parameter in iCalendar, which is added to individual properties.
                        When converting from iCalendar, one language must be picked as the main locale for the
                        object, and all properties in other languages moved to the localizations JSEvent property.
                    </c>

                    <c>localizations</c>
                    <c>
                        Corresponds to the LANGUAGE parameter in iCalendar, which is added to individual properties.
                        When converting from iCalendar, one language must be picked as the main locale for the
                        object, and all properties in other languages moved to the localizations JSEvent property.
                    </c>

                    <c>locations</c>
                    <c>
                        See <xref target="translate-locations-participants"/>.
                    </c>

                    <c>method</c>
                    <c>
                        Corresponds to the METHOD property in iCalendar.
                    </c>

                    <c>participants</c>
                    <c>
                        See <xref target="translate-locations-participants"/>.
                    </c>

                    <c>priority</c>
                    <c>
                        Corresponds to the PRIORITY property in iCalendar.
                    </c>

                    <c>privacy</c>
                    <c>
                        Corresponds to the CLASS property in iCalendar.
                    </c>

                    <c>prodId</c>
                    <c>
                        Corresponds to the PRODID property in iCalendar.
                    </c>

                    <c>recurrenceOverrides</c>
                    <c>
                        Corresponds to the RDATE and EXDATE properties in iCalendar, plus VEVENT (for JSEvent) or
                        VTODO (for JSTask) instances with a Recurrence-Id.
                    </c>

                    <c>recurrenceRule</c>
                    <c>
                        Corresponds to the RRULE property in iCalendar. See the property definition at section
                        <xref target="recurrenceRule"/>
                        how to map a RRULE value.
                    </c>

                    <c>relatedTo</c>
                    <c>
                        Corresponds to the RELATED-TO property in iCalendar.
                    </c>

                    <c>replyTo</c>
                    <c>
                        A <spanx style="strong">replyTo</spanx> property of type <spanx style="verb">imip</spanx> corresponds
                        to the email address of the ORGANIZER property in iCalendar. There is no iCalendar
                        representation for the <spanx style="verb">web</spanx> type.
                    </c>

                    <c>sequence</c>
                    <c>
                        Corresponds to the SEQUENCE property in iCalendar.
                    </c>

                    <c>status</c>
                    <c>
                        Corresponds to the STATUS property in iCalendar (converted to lower-case).
                    </c>

                    <c>title</c>
                    <c>
                        Corresponds to the SUMMARY property in iCalendar.
                    </c>

                    <c>uid</c>
                    <c>
                        Corresponds to the UID property in iCalendar.
                    </c>

                    <c>updated</c>
                    <c>
                        Corresponds to the DTSTAMP and LAST-MODIFIED properties in iCalendar. (These are only
                        different in the iTIP case, and the difference is not actually useful.)
                    </c>
                </texttable>
            </section>

            <section anchor="translate-locations-participants" title="Locations and participants">
                <t>
                    Both JSCalendar participants and locations have counterparts in iCalendar
                    but provide richer representation.
                    <vspace blankLines="1"/>
                    The following table outlines translation of JSCalendar participants. Where
                    iCalendar has distinct properties for ORGANIZER and ATTENDEE, these are merged
                    in JSCalendar into the Participant object type.
                </t>
                <texttable anchor="translate-participants-table"
                  title="Translation of Participant between JSCalendar and iCalendar">
                    <ttcol align='left'>Property</ttcol>
                    <ttcol align='left'>iCalendar counterpart</ttcol>
                    <c>
                        name
                    </c>
                    <c>
                        the CN parameter
                    </c>
                    <c>
                        kind
                    </c>
                    <c>
                        the CUTYPE parameter
                    </c>
                    <c>
                        rsvpResponse
                    </c>
                    <c>
                        the PARTSTAT parameter
                    </c>
                    <c>
                        role
                    </c>
                    <c>
                        the ORGANIZER and ATTENDEE property name
                    </c>
                    <c>
                        participation
                    </c>
                    <c>
                        the ROLE parameter
                    </c>
                    <c>
                        locationId
                    </c>
                    <c>
                        the JSCalendar identifier of a mapped CONFERENCE property that has the
                        MODERATOR feature defined in its FEATURE parameter values. If multiple
                        such CONFERENCE properties are defined in iCalendar, then the one with the
                        most interactive features is chosen (VIDEO over AUDIO over CHAT over
                        anything else).
                    </c>
                    <c>
                        rsvpWanted
                    </c>
                    <c>
                        the RSVP parameter
                    </c>
                    <c>
                        delegatedTo
                    </c>
                    <c>
                        the DELEGATED-TO parameter
                    </c>
                    <c>
                        delegatedFrom
                    </c>
                    <c>
                        the DELEGATED-FROM parameter
                    </c>
                    <c>
                        memberOf
                    </c>
                    <c>
                        the MEMBER parameter
                    </c>
                    <c>
                        scheduleSequence
                    </c>
                    <c>
                        the SEQUENCE property of the participant's latest iMIP message
                    </c>
                    <c>
                        scheduleUpdated
                    </c>
                    <c>
                        the DTSTAMP property of the participant's latest iMIP message
                    </c>
                </texttable>
                <t>
                    For JSCalendar locations, the iCalendar counterparts are the
                    <xref target="RFC5545"/> LOCATION and the extended iCalendar
                    <xref target="RFC7986"/> CONFERENCE properties.
                    <vspace blankLines="1"/>
                    An iCalendar LOCATION property becomes a JSCalendar Location with just a
                    description property. CONFERENCE property values in iCalendar map to locations
                    with <spanx style="strong">rel</spanx> type <spanx style="verb">virtual</spanx>.
                    The location <spanx style="strong">feature</spanx> property value corresponds to
                    the extended iCalendar FEATURE property parameter values defined in
                    <xref target="RFC7986"/>. Both iCalendar PHONE and AUDIO features map to the
                    <spanx style="verb">audio</spanx> feature and the FEED parameter value is
                    omitted. See the mapping for <spanx style="strong">locationId</spanx> in
                    <xref target="translate-participants-table"/> on how to map CONFERENCE
                    properties that contain the MODERATOR feature.
                </t>
            </section>

            <section title="Unknown properties">
                <t>
                    Both JSCalendar and iCalendar calendar objects may contain properties that are
                    not expressible in the other format. This specification does not mandate how to
                    preserve these properties. Instead, it leaves negotiation on how to treat unknown
                    properties to client and server implementations and their protocol used to exchange
                    calendar objects.
                    <vspace blankLines="1"/>
                    Two notable options to represent and preserve arbitrary iCalendar object
                    properties in JSCalendar are:
                    <list style="symbols">
                        <t>
                            <spanx style="strong">JCal</spanx>: Define iCalendar properties in JCal
                            format
                            (<xref target="RFC7265"/>) in a vendor-specific property of the
                            JCalendar
                            object. The JCal-formatted value may either only contain iCalendar
                            properties that were not mapped to JSCalendar properties, or contain the
                            complete iCalendar object representation.
                        </t>
                        <t>
                            <spanx style="strong">Alternate link</spanx>: Define an alternate link
                            (<xref target="links"/>)
                            value pointing to the iCalendar representation of the JSCalendar object.
                            E.g. the alternative representation of a VEVENT would be represented as
                            a link with rel <spanx style="verb">alternate</spanx> and type
                            <spanx style="verb">text/calendar;component=VEVENT</spanx>.
                        </t>
                    </list>
                </t>
            </section>
        </section>

        <section anchor="examples" title="JSCalendar object examples">
            <t>
                The following examples illustrate several aspects of the JSCalendar data model and format.
            </t>
            <section anchor="example-simple-event" title="Simple JSEvent">
                <t>
                This JSEvent object represents a one-time event taking place
                on September 28 at 4pm, UTC for one hour.
                </t>
                <figure>
                    <artwork><![CDATA[
    {
        "@type": "jsevent",
        "uid": "2a358cee-6489-4f14-a57f-c104db4dc357",
        "updated": "2016-09-14T13:24:34Z",
        "title": "Squash",
        "description": "",
        "start": "2016-09-28T16:00:00",
        "timeZone": "Etc/UTC",
        "duration": "PT1H",
        "recurrenceRule": null,
        "recurrenceOverrides": null,
        "freeBusyStatus": "free",
        "replyTo": null,
        "participants": null,
        "alerts": null,
        "links": null,
        "locations": null,
        "locale": "en",
        "localizations": null,
    }
    ]]></artwork>
                </figure>
                <t>
                    Since properties can be omitted if their default value is used, this can be simplified to:
                </t>
                <figure>
                    <artwork><![CDATA[
    {
        "@type": "jsevent",
        "uid": "2a358cee-6489-4f14-a57f-c104db4dc357",
        "updated": "2016-09-14T13:24:34Z",
        "title": "Squash",
        "start": "2016-09-28T16:00:00",
        "timeZone": "Etc/UTC",
        "duration": "PT1H",
        "locale": "en"
    }
    ]]></artwork>
                </figure>
            </section>
            <section anchor="example-recurring-event" title="Recurring JSEvent with exception">
                <t>
                    This JSEvent object represents a recurring event, taking place the first time
                    on January 1, 2016 at 1pm in Vienna, Europe. It recurs monthly, but does not
                    occur on February 1, 2016. In addition to the regular recurrences it also
                    occurs on December 5, 2016 at 5pm, Vienna time. On May 1, it takes place at
                    another location and lasts for two hours, in contrast to the regular one-hour duration.
                </t>
                <figure>
                    <artwork><![CDATA[
   {
      "@type": "jsevent",
      "uid": "89eee195-600b-423b-b3a6-52b3a420e556",
      "title": "Tennis",
      "locations": {
            "loc1" : {
                 "description" : "Joe's Tennis Plaza, Court #1"
            }
      },
      "isAllDay": false,
      "start": "2016-01-01T13:00:00",
      "timeZone": "Europe/Vienna",
      "duration": "PT1H",
      "recurrenceRule": {
        "frequency": "monthly",
      },
      "recurrenceOverrides": {
        "2016-02-01T13:00:00": null,
        "2016-05-01T13:00:00": {
          "duration": "PT2H",
          "locations": {
            "loc2": {
                "description": "Tennis Fritz&Mayer, Ltd."
            }
          },
        "2016-12-05T17:00:00": {},
        }
      }
    }
    ]]></artwork>
                </figure>
                <t>
                    Note that the recurrenceOverride on May 1 overrides the complete location object.
                    If the event should occur at <spanx style="strong">both</spanx> locations, the
                    PatchObject would be defined as follows:
                </t>
                <figure>
                    <artwork><![CDATA[
   {
      [...]
      "recurrenceOverrides": {
        [...]
        "2016-05-01T13:00:00": {
          "duration": "PT2H",
          "locations/loc2": {
                "description": "Tennis Fritz&Mayer, Ltd."
          }
        }
      }
    ]]></artwork>
                </figure>
            </section>
        </section>

        <section anchor="security-considerations" title="Security Considerations">
            <t>
                The use of JSON as a format does have its own inherent security risks as discussed in Section 12 of
                <xref target="RFC7159"/>. Even though JSON is considered a safe subset of JavaScript, it should be kept in
                mind that a flaw in the parser processing JSON could still impose a threat, which doesn't arise with
                conventional iCalendar data.
            </t>
            <t>
                With this in mind, a parser for JSON data aware of the security implications should be used for the
                format described in this document. For example, the use of JavaScript's
                <spanx style="verb">eval()</spanx> function is considered an unacceptable security risk, as described
                in Section 12 of<xref target="RFC7159"/>. A native parser with full awareness of the JSON format should
                be preferred.
            </t>
        </section>

        <section anchor="iana-considerations" title="IANA Considerations">
            <t>
                This document amends the <spanx style="verb">application/calendar</spanx> MIME media
                type defined in <xref target="RFC7265"/>.
            </t>
            <t>
                New optional parameter: <spanx style="verb">type</spanx> with value being one of
                <spanx style="verb">jsevent</spanx>, <spanx style="verb">jstask</spanx>,
                <spanx style="verb">jsgroup</spanx>.
                The parameter MUST NOT occur more than once.
            </t>
        </section>

        <section anchor="acknowledgments" title="Acknowledgments">
            <t>
                The author would like to thank the following for their valuable contributions: (TODO:names). This
                specification originated from the work of the API technical committee of CalConnect, the Calendaring and
                Scheduling Consortium.
            </t>
        </section>
    </middle>

    <back>
        <references title="Normative References">
            <?rfc include="http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"?>
            <?rfc include="http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3339.xml"?>
            <?rfc include="http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3986.xml"?>
            <?rfc include="http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4122.xml"?>
            <?rfc include="http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4791.xml"?>
            <?rfc include="http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5545.xml"?>
            <?rfc include="http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5546.xml"?>
            <?rfc include="http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5646.xml"?>
            <?rfc include="http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5870.xml"?>
            <?rfc include="http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5988.xml"?>
            <?rfc include="http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6047.xml"?>
            <?rfc include="http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6838.xml"?>
            <?rfc include="http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6901.xml"?>
            <?rfc include="http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7159.xml"?>
            <?rfc include="http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7265.xml"?>
            <?rfc include="http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7493.xml"?>
            <?rfc include="http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7529.xml"?>
            <?rfc include="http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7986.xml"?>
        </references>
        <references title="Informative References">
            <reference anchor="draft-apthorp-ical-tasks"
                       target="https://tools.ietf.org/html/draft-apthorp-ical-tasks">
                <front>
                    <title>Task Extensions to iCalendar</title>
                    <author/>
                    <date/>
                </front>
            </reference>
            <reference anchor="draft-ietf-calext-ical-relations"
                       target="https://tools.ietf.org/html/draft-ietf-calext-ical-relations">
                <front>
                    <title>Support for iCalendar Relationships</title>
                    <author/>
                    <date/>
                </front>
            </reference>
            <reference anchor="draft-daboo-valarm-extensions"
                       target="https://tools.ietf.org/html/draft-daboo-valarm-extensions">
                <front>
                    <title>VALARM Extensions for iCalendar</title>
                    <author/>
                    <date/>
                </front>
            </reference>

        </references>
    </back>
</rfc>
