Kaizen
Browse modulesBookingsbookings/sharedFunctions

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's WallClockRangeSchema.
  • dtstartLocal is the FIRST occurrence on/after effectiveFrom, at the pattern's open time — wall-clock, no offset (DST-stable, spec §6.8).

Parameters

Returns

ResourceAvailabilityTemplate[]

On this page