function bookedRangeLabel
bookedRangeLabel(
date: string | null,
endDate: string | null,
fallbackDurationDays?: number,
): string

The human-readable label for one booking's actual span: the stored [date, endDate) range when a multi-day range is stored, the listing's fixed duration when only a start date is (legacy rows written before end dates were stored), else the single booked day. "" when there is no date. The ONE booked-range renderer the confirmation email, the /t ticket cards, and the collapsed package displays share, so they can never disagree about a booking's stay.

Parameters

date: string | null
endDate: string | null
optional
fallbackDurationDays: number = 1

Return Type

string

Usage

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