Skip to content

WeeklyEvent

WEEKLY - Recurring events on one or more days every week Supports multiple weekdays, intervals, date range, and date exclusions.

// Every Monday
{ type: "weekly", id: "standup", dayOfWeek: 1 }
// Every Monday, Wednesday & Friday (like an alarm's "Repeat")
{ type: "weekly", id: "logwork", dayOfWeek: [1, 3, 5] }
// Every other Wednesday
{ type: "weekly", id: "biweekly-sync",
dayOfWeek: 3, interval: 2 }
// Every Friday with date range
{ type: "weekly", id: "sprint-review",
dayOfWeek: 5, startDate: "2025-01-01", endDate: "2025-12-31" }

TMetadata extends Record<string, unknown> = Record<string, unknown>

Custom metadata type extending Record<string, unknown>

TCategory extends string = string

optional allDay?: boolean

BaseEventProperties.allDay


optional categories?: TCategory[]

BaseEventProperties.categories


optional color?: string

BaseEventProperties.color


dayOfWeek: WeekdayIndex | WeekdayIndex[]

Day of the week, or several. 0=Sunday, 1=Monday, ..., 6=Saturday. A list fires on each selected day every week (ICS BYDAY semantics); with interval, all selected days share one reference week.

1 // Monday
[1, 3, 5] // Monday, Wednesday, Friday

optional description?: string

BaseEventProperties.description


optional duration?: number

BaseEventProperties.duration


optional endDate?: string

End date for the recurrence (ISO format: YYYY-MM-DD)

"2025-12-31"

BaseEventProperties.endDate


optional endTime?: string

BaseEventProperties.endTime


optional exceptions?: EventExceptions

Per-occurrence exceptions keyed by the event’s ORIGINAL computed date (YYYY-MM-DD) — maps ICS EXDATE / RECURRENCE-ID. { skip: true } drops that occurrence; { override } replaces properties for that one instance.

BaseEventProperties.exceptions


optional excludeDates?: string[]

Specific dates to exclude (ISO format: YYYY-MM-DD)

["2025-12-25"] // Skip Christmas

optional icon?: string

BaseEventProperties.icon


id: string

BaseEventProperties.id


optional interval?: number

Recurrence interval in weeks (default: 1)

2 // Every 2 weeks (bi-weekly)

optional keywords?: string[]

BaseEventProperties.keywords


optional location?: string

BaseEventProperties.location


optional metadata?: TMetadata

BaseEventProperties.metadata


optional onConflict?: ConflictResolver

Conflict resolver for handling events on the same day. Called during event generation to determine action when this event would occur on a specific date.

Default behavior (when not specified): keep all events

BaseEventProperties.onConflict


optional overrideDates?: OverrideDatesMap

Force reschedule dates unconditionally. Unlike onConflict which handles conflicts, this always moves events. Key is the original computed date (YYYY-MM-DD), value is the new date.

overrideDates: {
"2026-02-18": "2026-02-20", // Move from Feb 18 to Feb 20
}

BaseEventProperties.overrideDates


optional priority?: number

Display precedence when several events land on the same day, like CSS z-index: higher = on top, default 0. The core only sorts by this number (highest first); it assigns no meaning to the values — the consumer does. Ties keep generation order (stable).

BaseEventProperties.priority


optional reminders?: Reminder[]

BaseEventProperties.reminders


optional source?: string

Origin of the event — the plugin, feed, or ICS subscription that produced it. Lets a consumer customize/filter in bulk by source (like toggling a calendar in Google/Apple Calendar) and namespaces the ICS export UID. Distinct from groupId (a user-defined group) and sourceEventId (the originating config id).

BaseEventProperties.source


optional startDate?: string

Start date for the recurrence (ISO format: YYYY-MM-DD) Used as reference point for interval calculation

"2025-01-06" // First Monday of 2025

BaseEventProperties.startDate


optional startTime?: string

BaseEventProperties.startTime


optional status?: "confirmed" | "tentative" | "cancelled"

BaseEventProperties.status


optional templates?: Record<string, string>

Per-occurrence dynamic fields, derived from each occurrence’s date. A map of fieldName → template, where the template may contain date tokens ({YYYY} {MM} {DD} zero-padded · {M} {D} no padding). Each occurrence gets the field set to the interpolated value.

Applied during generation, after the base value and before a per-date exceptions[date].override (which always wins). Typically used for a date-specific url, but any string field works (title, description, location, …).

// Every Sunday's link points at a date page
{ type: "weekly", id: "mass", dayOfWeek: 0, title: "Mass",
templates: { url: "https://x.com/mass/{D}-{M}" } }
// 2026-07-07 → .../mass/7-7 · 2026-07-14 → .../mass/14-7

BaseEventProperties.templates


title: string

BaseEventProperties.title


type: "weekly"


optional url?: string

BaseEventProperties.url