Liking cljdoc? Tell your friends :D

boundary.calendar.core.recurrence

RRULE parsing and occurrence expansion — pure functions, no I/O.

Uses ical4j's net.fortuna.ical4j.model.Recur for RFC 5545 RRULE parsing. All date arithmetic uses java.time with explicit timezone handling so that DST transitions are respected (e.g. a 9:00 AM recurring event stays at 9:00 AM local time even when UTC offset changes).

ical4j 4.x API note: Recur.getDates accepts java.time.ZonedDateTime seeds and returns List<ZonedDateTime>, giving correct DST-aware expansion.

FC/IS rule: no I/O, no logging, no exceptions thrown for valid inputs.

RRULE parsing and occurrence expansion — pure functions, no I/O.

Uses ical4j's net.fortuna.ical4j.model.Recur for RFC 5545 RRULE parsing.
All date arithmetic uses java.time with explicit timezone handling so that
DST transitions are respected (e.g. a 9:00 AM recurring event stays at
9:00 AM local time even when UTC offset changes).

ical4j 4.x API note: Recur.getDates accepts java.time.ZonedDateTime seeds
and returns List<ZonedDateTime>, giving correct DST-aware expansion.

FC/IS rule: no I/O, no logging, no exceptions thrown for valid inputs.
raw docstring

expand-eventclj

(expand-event event window-start window-end)

Return a vector of single-occurrence EventData maps for the given window.

Each returned map has :start and :end set to the occurrence's times. The :recurrence key is removed since each map represents a single occurrence.

For non-recurring events: returns a single-element vector (or empty if outside window).

Args: event - EventData map window-start - java.time.Instant window-end - java.time.Instant

Returns a vector of EventData maps (without :recurrence key).

Return a vector of single-occurrence EventData maps for the given window.

Each returned map has :start and :end set to the occurrence's times.
The :recurrence key is removed since each map represents a single occurrence.

For non-recurring events: returns a single-element vector (or empty if outside window).

Args:
  event        - EventData map
  window-start - java.time.Instant
  window-end   - java.time.Instant

Returns a vector of EventData maps (without :recurrence key).
sourceraw docstring

next-occurrenceclj

(next-occurrence event)

Return the first occurrence start Instant after now, or nil if none.

For non-recurring events: returns (:start event) if it is in the future, else nil.

Args: event - EventData map

Returns java.time.Instant or nil.

Return the first occurrence start Instant after now, or nil if none.

For non-recurring events: returns (:start event) if it is in the future, else nil.

Args:
  event - EventData map

Returns java.time.Instant or nil.
sourceraw docstring

occurrencesclj

(occurrences event window-start window-end)

Return a vector of Instants representing occurrence starts within [window-start, window-end).

For recurring events the RRULE is parsed via ical4j Recur and dates are iterated as ZonedDateTimes in the event's :timezone so that DST transitions are correctly handled — a 09:00 local-time recurrence stays at 09:00 even after a clock change.

For non-recurring events: returns [(:start event)] if the event overlaps the window (start < window-end AND end > window-start), else [].

Args: event - EventData map window-start - java.time.Instant (inclusive) window-end - java.time.Instant (exclusive)

Returns a vector of java.time.Instant values (occurrence starts).

Return a vector of Instants representing occurrence starts within [window-start, window-end).

For recurring events the RRULE is parsed via ical4j Recur and dates are
iterated as ZonedDateTimes in the event's :timezone so that DST transitions
are correctly handled — a 09:00 local-time recurrence stays at 09:00 even
after a clock change.

For non-recurring events: returns [(:start event)] if the event overlaps
the window (start < window-end AND end > window-start), else [].

Args:
  event        - EventData map
  window-start - java.time.Instant (inclusive)
  window-end   - java.time.Instant (exclusive)

Returns a vector of java.time.Instant values (occurrence starts).
sourceraw docstring

recurring?clj

(recurring? event)

Return true if the event has a non-blank :recurrence (RRULE) value.

Args: event - EventData map

Returns boolean.

Return true if the event has a non-blank :recurrence (RRULE) value.

Args:
  event - EventData map

Returns boolean.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close