3.7 KiB
ICS Export Requirements
Purpose
Define requirements for generating iCalendar (.ics) output from plugin calendar data.
Standards and RFC
ICS output must comply with the iCalendar specification:
- RFC 5545: Internet Calendaring and Scheduling Core Object Specification (iCalendar)
Where additional iCalendar properties are used beyond RFC 5545 core, they must be documented and standards-compatible.
Timezone Assumption
Unless explicitly overridden by a future requirement, all plugin dates and times are assumed to be in the Europe/London timezone.
Scope
This document covers:
- ICS feed/file generation
- Mapping from plugin event data to iCalendar properties
- Recurrence representation
- Validation and interoperability expectations
Output Requirements
- Content type must be
text/calendar. - Character encoding must be UTF-8.
- Calendar payload must include required VCALENDAR envelope properties.
- Output must be consumable by common calendar clients (Apple, Google, Outlook-class clients).
VCALENDAR Requirements
The ICS output must include, at minimum:
BEGIN:VCALENDARVERSION:2.0PRODIDidentifying the plugin/systemCALSCALE:GREGORIAN(recommended default)VTIMEZONEdefinition forEurope/LondonEND:VCALENDAR
VEVENT Mapping
Each plugin calendar entry maps to at least one VEVENT.
Field mapping requirements:
- Plugin
title->SUMMARY - Plugin
description->DESCRIPTION - Plugin
location->LOCATION - Plugin start date/time ->
DTSTART - Plugin end date/time ->
DTEND - Plugin category ->
CATEGORIES - Stable unique event identifier ->
UID - Last update timestamp ->
DTSTAMP
Additional mapping guidance:
- All-day events use date-based
DTSTART/DTENDsemantics per RFC 5545. - Timed events must use
DTSTART;TZID=Europe/LondonandDTEND;TZID=Europe/London. DTENDmust represent a valid end boundary and not precedeDTSTART.
Recurrence Mapping
Recurring entries should be represented with RRULE where possible.
Mapping expectations:
- Daily/weekly/monthly/yearly repeat -> corresponding
FREQvalues. - Custom interval (
every n) ->INTERVAL=n. - Range modes:
- No end date -> RRULE without
UNTILorCOUNT. - Create
<n>appointments -> RRULE withCOUNT=n. - Repeat until
<date>-> RRULE withUNTIL=<date/time>.
- No end date -> RRULE without
If specific recurrence shapes cannot be represented in a single RRULE, plugin may emit standards-compliant expanded VEVENT instances as fallback, documented in implementation notes.
Timezone Requirements
- ICS generation must use a deterministic timezone strategy documented in settings/docs.
- Current project baseline timezone is
Europe/Londonunless explicitly overridden by a future requirement. - For the baseline configuration, ICS output must include a
VTIMEZONEblock describingEurope/London. - For the baseline configuration, timed
DTSTARTandDTENDvalues must useTZID=Europe/London. - If a future configurable timezone mode is introduced, output must remain standards-compliant and subscriber-coherent.
Data Quality and Escaping
- Text values must be escaped/formatted according to iCalendar rules (e.g., commas, semicolons, line folding).
- Invalid or incomplete records must not produce malformed ICS output.
- Generation errors should fail safely with observable error handling.
Security and Privacy
- Export must include only events intended for public/user-facing distribution.
- Internal/admin-only metadata must not leak into ICS properties.
Verification Requirements
Acceptance should verify:
- Output validates as RFC 5545-compatible ICS.
- Field mappings are correct for single and recurring events.
- All-day and timed events render correctly in major clients.
- Recurrence limits (
COUNT/UNTIL) behave as configured.