effect-io-ai

Package: effect
Module: SchemaTransformation

SchemaTransformation.timeZoneNamedFromString

Decodes an IANA time-zone identifier string into a DateTime.TimeZone.Named and encodes a named time zone back to its id.

When to use

Use when you need a schema transformation to accept only IANA time-zone identifier strings and produce DateTime.TimeZone.Named values.

Details

Decode fails with InvalidValue when the string is not a valid IANA time-zone identifier.

See

Signature

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

Source

Since v4.0.0