Skip to main content

Module exceptions

Module exceptions 

Source
Expand description

Exceptions to a repeating entry: an occurrence that is gone, and one that moved.

A repeating timestamp describes an endless series and has nowhere to say that one of its occurrences is different. ADR-0031 answers that in the shape iCalendar settled on, written with the org-properties keys of ADR-0020:

  • EXDATE on the series lists occurrences the series does not have;
  • a separate entry carrying SERIES_ID and RECURRENCE_ID replaces the one occurrence it names, and needs no EXDATE beside it — that is RFC 5545’s split between an occurrence that is gone and one that moved.

The two reasons are kept apart all the way to the agenda, because they part ways over a debt: nothing is owed for an occurrence that never was, and what is owed for one that moved is owed by the entry it moved to.

Matching is at day granularity, because the agenda draws at most one occurrence of a series per day; the clock time a RECURRENCE_ID may carry is kept for the reader and for export, and is not matched on.

Structs§

ExcludedOccurrences
The occurrences one entry does not have, kept apart by reason.
OccurrenceExceptions
Which occurrences of which series are not there, for one run.

Constants§

EXDATE_KEY
Property key listing the occurrences a series does not have.
ID_KEY
Property key holding a task’s own stable identifier (ADR-0020).
RECURRENCE_ID_KEY
Property key naming the occurrence an entry replaces.
SERIES_ID_KEY
Property key naming the series an entry replaces an occurrence of.

Functions§

parse_excluded_dates
The dates listed in an EXDATE value, normalised to YYYY-MM-DD.
parse_recurrence_id
The occurrence a RECURRENCE_ID value names: a date, optionally followed by a clock time.
recurrence_id_date
The date half of a RECURRENCE_ID, which is what occurrences match on.