Skip to main content

Interface: SchedulingPeriod

Defines a scheduling period as a date range with optional filters. The dateRange specifies the overall scheduling window. Use daysOfWeek 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

const period: SchedulingPeriod = {
  dateRange: { start: "2025-02-03", end: "2025-02-09" },
};
const period: SchedulingPeriod = {
  dateRange: { start: "2025-02-03", end: "2025-02-09" },
  daysOfWeek: ["wednesday", "thursday", "friday", "saturday", "sunday"],
};
const period: SchedulingPeriod = {
  dateRange: { start: "2025-02-03", end: "2025-02-09" },
  dates: ["2025-02-05", "2025-02-07"],
};

Properties

dateRange

dateRange: {
  end: string;
  start: string;
}
The overall scheduling window (start and end are inclusive). Dates should be in YYYY-MM-DD format.

end

end: string;

start

start: string;

dates?

optional dates: string[];
Include only these specific dates (YYYY-MM-DD) within the range. If omitted, all dates in the range are included (subject to daysOfWeek filter).

daysOfWeek?

optional daysOfWeek: DayOfWeek[];
Include only these days of the week. If omitted, all days of the week are included.