calendaring_jmap.convert.jscal_to_ical module#

JSCalendar to iCalendar conversion (RFC 8984 to RFC 5545).

Public API:

jscal_to_ical(jscal: dict) -> str

Accepts a raw JSCalendar CalendarEvent dict (as returned by CalendarEvent/get or produced by ical_to_jscal). Returns a VCALENDAR string.

calendaring_jmap.convert.jscal_to_ical.jscal_to_ical(jscal)[source]#

Convert a JSCalendar CalendarEvent dict to an iCalendar VCALENDAR string.

Handles the full set of fields supported by ical_to_jscal for round-trip fidelity. recurrenceOverrides entries with excluded: true become EXDATE properties; patch dicts become child VEVENTs with RECURRENCE-ID.

Parameters:

jscal (dict) – A raw JSCalendar CalendarEvent dict as returned by CalendarEvent/get.

Return type:

str

Returns:

An iCalendar VCALENDAR string, normalised by fixup.

Raises:

ValueError – If uid is absent or empty (mandatory per RFC 8984 Section 4.1.2; a server response should always include it, but emitting an UID-less VEVENT, invalid per RFC 5545, would be a worse failure mode than raising here).

Last updated on 2026-11-01.