TimeZoneSchema
const TimeZoneSchema: Type<(In) => Out<TimeZone>, {}>;Defined in: arktype-utils.ts:23
ArkType schema: validate an IANA id and brand it as TimeZone. The value is not canonicalized. It has no custom message, so failures read “must be valid according to an anonymous predicate”.
Example
Section titled “Example”import { type } from "arktype";import { TimeZoneSchema } from "@xtandard/lib/arktype";
TimeZoneSchema("Asia/Tokyo"); // "Asia/Tokyo" (TimeZone)
const out = TimeZoneSchema("Mars/Olympus");if (out instanceof type.errors) { out.summary; // 'must be valid according to an anonymous predicate (was "Mars/Olympus")'}