Skip to main content
function maxDaysOfWeekPerPeriod(
   days,
   dayOfWeek,
   opts): MaxDaysOfWeekPerPeriodRuleEntry;
Caps how many times a person works on specific days of the week within each period.

Parameters

days
number
required
Maximum number of matching days allowed per period.
dayOfWeek
required
readonly [DayOfWeek, DayOfWeek]Which days of the week count toward the limit.
opts
required
DaysOfWeekPerPeriodOptionsPeriod length and optional scoping.

Returns

MaxDaysOfWeekPerPeriodRuleEntry
The scheduling window is divided into non-overlapping chunks of the configured period length. Within each chunk, only days matching the dayOfWeek filter are counted. The constraint bounds that count.