Skip to main content
function timeOff(opts): RuleEntry;
Block assignments during specified periods. Requires at least one time scope (dayOfWeek, dateRange, dates, or from/until).

Parameters

opts
required

Returns

RuleEntry

Example

// Full days off
timeOff({ appliesTo: "alice", dateRange: { start: "2024-02-01", end: "2024-02-05" } })

// Every weekend off
timeOff({ appliesTo: "mauro", dayOfWeek: weekend })

// Wednesday afternoons off
timeOff({ appliesTo: "student", dayOfWeek: ["wednesday"], from: t(14) })