Function: weeklyHoursToSeries()
function weeklyHoursToSeries(map: WeeklyHoursMap, opts: WeeklyHoursToSeriesOptions): ResourceAvailabilityTemplate[];Defined in: shared/bookings/weekly-hours.ts:117
Expand a weekly hours map into ResourceAvailability series templates —
one per distinct (open, close) interval, BYDAY grouping the weekdays that
share it (spec §6.9 "Weekly hours stay a one-liner").
- Intervals must not cross midnight (
open < close) — an overnight window is two series (or a one-off exception window), same constraint as scheduling'sWallClockRangeSchema. dtstartLocalis the FIRST occurrence on/aftereffectiveFrom, at the pattern's open time — wall-clock, no offset (DST-stable, spec §6.8).
Parameters
| Parameter | Type |
|---|---|
map | WeeklyHoursMap |
opts | WeeklyHoursToSeriesOptions |