Skip to main content

Module calendar

Module calendar 

Source
Expand description

iCalendar (RFC 5545) feed for the vault’s dates — the Rust twin of src/ts/calendar.ts.

This is the fourth format in the project implemented twice, and it follows the rule the other three established: one golden file, asserted from both sides. tests/fixtures/parity/calendar.ics is written by the TypeScript suite and read back by unv-cli/tests/parity.rs, because reviewing two implementations for agreement does not work — the first time that fixture ran for the exporters it found two live bugs.

§What is deliberately not in the file

No secret values, and no fingerprints either. An .ics is the least private thing this program writes: it exists to be handed to Google Calendar or a phone, which stores it unencrypted on hardware nobody here controls. A fingerprint is stable per value, so a feed carrying them would tell anyone holding two feeds which secrets are the same — an equality oracle over the vault, published to a third party. Names and dates travel; nothing else.

Structs§

IcsOptions
Options for build_ics.

Enums§

EventKind
Which kinds of event to emit.

Functions§

build_ics
Builds the calendar. Byte-identical to buildIcs in src/ts/calendar.ts for the same input — that is what the parity fixture checks.
entry_label
Display name: provider, plus whatever distinguishes it from its siblings.
event_count
Number of VEVENT blocks in a rendered calendar — for the CLI’s summary line, which reports a count rather than printing the file.
ics_escape
RFC 5545 §3.3.11 escaping: backslash, semicolon, comma, newline.
ics_fold
RFC 5545 §3.1 folding: 75 octets for the first line, 74 for each continuation, which begins with a space.
next_day
The day after YYYYMMDD — what an all-day DTEND must be.
rotation_due
When rotation is next due, anchored on the last rotation or, failing that, on creation.
to_ics_date
2026-08-26T21:00:00Z → 20260826 (UTC), or None when unparseable.
to_ics_stamp
2026-08-26T21:00:00Z → 20260826T210000Z, for DTSTAMP.