Function: tzAbbrev()
tzAbbrev(
instant,timeZone):string
Defined in: src/lib/dates/tz.ts:62
Short timezone label (e.g. "EST"/"EDT") for instant in timeZone, for display.
The abbreviation is DST-aware: the same timeZone yields EST vs EDT depending on whether
instant falls in standard or daylight time. Display-only — not a parseable offset.
Parameters
instant
Date
The absolute point in time (a UTC-based Date) whose DST state selects the label.
timeZone
string
IANA timezone identifier (e.g. America/New_York).
Returns
string
The short timezone name from Intl (e.g. EST, EDT). Falls back to the raw
timeZone string if the runtime cannot produce a short name.
Throws
RangeError If timeZone is not a valid IANA identifier, or if instant is an invalid Date.