Skip to content

spatial-monorepo


spatial-monorepo / wayfinding/src / OperatingHoursWindow

Interface: OperatingHoursWindow

Defined in: packages/wayfinding/src/schedule.ts:32

One venue-local time window. daysOfWeek, when supplied, restricts the window to those days (0 = Sunday .. 6 = Saturday, matching Date.prototype.getDay); omitted, the window applies every day. startMinute/endMinute are minutes since venue-local midnight (0..1440), half-open [startMinute, endMinute). A window that should span midnight (e.g. "closed 22:00-06:00") must be authored as two windows (22:00-24:00 and 00:00-06:00) rather than endMinute < startMinute — this keeps evaluation a single cheap comparison with no wraparound branch.

Evaluated against the Date passed as now using its local getters (getDay/getHours/getMinutes) — callers in a different timezone than the venue must construct/convert now to the venue's local wall-clock time themselves (this package has no timezone database dependency).

Properties

daysOfWeek?

optional daysOfWeek?: number[]

Defined in: packages/wayfinding/src/schedule.ts:33


endMinute

endMinute: number

Defined in: packages/wayfinding/src/schedule.ts:35


startMinute

startMinute: number

Defined in: packages/wayfinding/src/schedule.ts:34

Released under commercial licensing.