> ## 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.

# minDaysOfWeekPerPeriod

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

Requires each targeted member to work at least this many matching weekdays
within each configured week or month period.

## Parameters

<ResponseField name="days" type="number" required>
  Minimum number of matching days required 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}
MinDaysOfWeekPerPeriodRuleEntry
```

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 ensures the count meets
the minimum.

When the scheduling window does not align evenly with the period
boundaries, the last chunk may contain fewer matching days than the
minimum. A MANDATORY priority will make the model infeasible in that
case. Use a soft priority (HIGH, MEDIUM, LOW) if partial periods at
the edges of the window are expected.
