Skip to content

@xtandard/lib/effect

Branded TimeZone schema for Effect (peer effect).

import { … } from "@xtandard/lib/effect";
Name Summary
parseTimeZone Parse an unknown value as a TimeZone, throwing when it isn’t a valid IANA id. Shorthand for Schema.decodeUnknownSync(TimeZoneSchema)(input).
Name Summary
TimeZoneSchema Effect schema: validate an IANA id and brand it as TimeZone. Fails with the message "Invalid IANA time zone". The value is not canonicalized. It is a two-way transformation: the encoded side is a plain string, so Schema.encodeSync gives the string back.