Function availability
-
availability(
w: Timewindow,
seats?: number,
leadHours?: number,
now?: number,
): { bookable: boolean; icon: string; state: string; text: string }Parameters
- w: Timewindow
W supplied by the host.
- seats: number = 1
Booked places, or requested seat count depending on the signature. Defaults to 1.
- leadHours: number = 24
Minimum Berlin wall-clock lead time in hours. Defaults to 24. Defaults to 24.
- now: number = ...
Current instant as milliseconds since the Unix epoch. Defaults to Date.now(). Defaults to Date.now().
Returns { bookable: boolean; icon: string; state: string; text: string }
-
bookable: boolean
Whether this slot can be selected for the requested seats.
-
icon: string
Availability icon name.
-
state: string
Availability state used for visual treatment.
-
text: string
Customer-visible German availability message.
- w: Timewindow
Classify a timewindow using capacity, lead time and backend booking deadlines.