> ## Documentation Index
> Fetch the complete documentation index at: https://docs.erna.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# maxDaysOfWeekPerPeriod

```ts theme={null}
function maxDaysOfWeekPerPeriod(
   days,
   dayOfWeek,
   opts): MaxDaysOfWeekPerPeriodRuleEntry;
```

Caps how many matching weekdays each targeted member can work within each
configured week or month period.

## Parameters

<ResponseField name="days" type="number" required>
  Maximum number of matching days allowed per period.
</ResponseField>

<ResponseField name="dayOfWeek" required>
  readonly \[[`DayOfWeek`](./DayOfWeek), [`DayOfWeek`](./DayOfWeek)]

  Which days of the week count toward the limit.
</ResponseField>

<ResponseField name="opts" required>
  [`DaysOfWeekPerPeriodOptions`](./DaysOfWeekPerPeriodOptions)

  Period length and optional scoping.
</ResponseField>

## Returns

```ts theme={null}
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.
