effect-io-ai

Package: effect
Module: SchemaTransformation

SchemaTransformation.timeZoneFromString

Decodes a string into a DateTime.TimeZone and encodes a time zone back to its string representation.

When to use

Use when you need a schema transformation to accept either an IANA time-zone identifier or an offset string and produce a general DateTime.TimeZone.

Details

Accepted decode inputs include valid IANA identifiers and offset strings such as "+03:00". Decode fails with InvalidValue when the string cannot be parsed as a time zone.

See

Signature

declare const timeZoneFromString: Transformation<DateTime.TimeZone, string, never, never>

Source

Since v4.0.0