function widestDatedEntry
widestDatedEntry<T extends { attendee: { date: string | null; end_date: string | null; }; }>(entries: readonly T[]): T | null

The dated entry whose booked range ends last — the stay covering a whole package bundle — or null when every entry is date-less (a standard package). A dated entry with no stored end (a single-day booking, or a legacy row) sorts below any ranged stay. Shared by the collapsed email/SVG displays and the /t package card, so every surface picks the SAME representative stay.

Type Parameters

T extends { attendee: { date: string | null; end_date: string | null; }; }

Parameters

entries: readonly T[]

Return Type

T | null

Usage

import { widestDatedEntry } from "doc.ts";