Skip to content

@xtandard/lib/zod

Branded TimeZone schema for Zod (peer zod).

import { … } from "@xtandard/lib/zod";
Name Summary
parseTimeZone Parse an unknown value as a TimeZone, throwing when it isn’t a valid IANA id. Shorthand for TimeZoneSchema.parse(input).
Name Summary
TimeZoneSchema Zod schema: validate an IANA id and brand it as TimeZone. Fails with the issue message "Invalid IANA time zone". The value is not canonicalized.