Skip to content

RecurrenceIterator does not support PERIOD values in RDATE (throws UnsupportedError at line 105) #23

@kozw

Description

@kozw

Problem

In lib/src/semantic/recurrence/recurrence_iterator.dart, the RecurrenceIterator only supports DATE-TIME values in the RDATE property. If a PERIOD value is present, it throws an UnsupportedError at line 105.

Expected Behavior

RecurrenceIterator should support both DATE-TIME and PERIOD values in RDATE, as outlined in RFC 5545. Periods may represent event spans or ranges.

Steps to Reproduce

  1. Provide a recurrence rule with RDATE containing a PERIOD value.
  2. Attempt to iterate; observe that an UnsupportedError is thrown.

Suggested Solution

  • Implement logic to handle PERIOD values in RDATE fields, consistent with RFC 5545 specification.
  • Tests should include both DATE-TIME and PERIOD RDATE values.

Reference:

  • [RFC 5545, Section 3.3.5 - Recurrence Date/Times (RDATE)](https://datatracker. ietf.org/doc/html/rfc5545#section-3.3.5)
  • See error thrown at line 105:
104|         if (rdate.isPeriod) {
105|           throw UnsupportedError(
106|             'RDATE with PERIOD values is not yet supported. '
107|             'Only RDATE with DATE-TIME values are currently supported.',
108|           );

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions