Browse modulesSchedulingFunctions
Function: isValidTimeZone()
function isValidTimeZone(zone: string): boolean;Defined in: shared/scheduling/is-valid-time-zone.ts:15
IANA time-zone validation, implemented against native Intl alone.
Deliberately its own module rather than living in ./zones: this function
has no Temporal dependency, but every other export in zones.ts does, so
anything importing it from there also pulls in @js-temporal/polyfill
(~129 KB raw / ~36 KB gzipped). shared/rules's condition schemas use this
for their zone refinement and are imported by the client pricing lane,
where that polyfill would be dead weight in a browser bundle. Keeping the
function dependency-free at the module level is what makes those schemas
safe to import from the client.
./zones re-exports it, so existing importers are unaffected.
Parameters
| Parameter | Type |
|---|---|
zone | string |
Returns
boolean