Skip to content

formatDate

formatDate(isoDate, options): string

Defined in: utils/format.ts:90

Format ISO date string as human-readable date.

string

ISO date string (e.g., “2024-01-15T10:30:00Z”)

DateTimeFormatOptions = ...

Intl.DateTimeFormat options

string

Formatted date string

formatDate("2024-01-15T10:30:00Z");
// "Jan 15, 2024, 10:30 AM" (in local timezone)
formatDate("2024-01-15T10:30:00Z", { dateStyle: "short" });
// "1/15/24"