function getNextBookableDate
getNextBookableDate(
listing: SortableListing,
holidays: Holiday[],
): string | null

Get the next available booking date for a daily listing. More efficient than getAvailableDates()[0] — stops at first match. Returns null if no bookable dates are available.

Parameters

listing: SortableListing
holidays: Holiday[]

Return Type

string | null

Usage

import { getNextBookableDate } from "docs/listings.ts";