diabetic-utils / formatDate
formatDate(
iso
,timeZone?
):string
Defined in: formatters.ts:44
Formats a UTC ISO 8601 timestamp to a local-readable date/time string. Used for clinical charting, logs, and reports. Supports optional IANA time zone.
string
ISO 8601 timestamp string (e.g., ‘2024-03-20T10:00:00Z’)
string
Optional IANA time zone (e.g., ‘America/New_York’)
string
Localized date/time string (e.g., ‘Mar 20, 2024, 06:00 AM’)
If the ISO string is invalid or cannot be parsed