Skip to main content

Function: isValidTimeZone()

isValidTimeZone(timeZone): boolean

Defined in: src/lib/dates/tz.ts:141

Whether timeZone is an IANA identifier this runtime accepts.

Every other helper here throws RangeError on an unknown zone. Timezones reaching them come from stored settings and facility rows, so a single bad value would otherwise take out every page that resolves a business day — use this to fall back instead of throwing.

Parameters

timeZone

string | null | undefined

Candidate IANA identifier.

Returns

boolean

true if Intl accepts it, false otherwise (including for empty/undefined input).