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

# SchedulingPeriod

Defines a scheduling period as a date range with optional filters.

The `dateRange` specifies the overall scheduling window. Use `dayOfWeek`
and/or `dates` to narrow which days within the range are included.
Filters compose: a day must pass all specified filters to be included.

## Examples

**All days in a week**

```typescript theme={null}
const period: SchedulingPeriod = {
  dateRange: { start: '2025-02-03', end: '2025-02-09' },
};
```

**Only specific days of the week (closed Mon/Tue)**

```typescript theme={null}
const period: SchedulingPeriod = {
  dateRange: { start: '2025-02-03', end: '2025-02-09' },
  dayOfWeek: ['wednesday', 'thursday', 'friday', 'saturday', 'sunday'],
};
```

**Only specific dates within the range**

```typescript theme={null}
const period: SchedulingPeriod = {
  dateRange: { start: '2025-02-03', end: '2025-02-09' },
  dates: ['2025-02-05', '2025-02-07'],
};
```

## Properties

<ResponseField name="dateRange" type="object" required>
  The overall scheduling window (start and end are inclusive).
  Dates should be in YYYY-MM-DD format.

  <Expandable title="properties">
    <ResponseField name="end" type="${number}-${number}-${number}" required />

    <ResponseField name="start" type="${number}-${number}-${number}" required />
  </Expandable>
</ResponseField>

<ResponseField name="dates" type="dates?: ${number}-${number}-${number}[]">
  Include only these specific dates (YYYY-MM-DD) within the range.
  If omitted, all dates in the range are included (subject to dayOfWeek filter).
</ResponseField>

<ResponseField name="dayOfWeek" type="dayOfWeek?: readonly DayOfWeek[]">
  Include only these days of the week.
  If omitted, all days of the week are included.
</ResponseField>
