Package: effect
Module: SchemaTransformation
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
timeZoneNamedFromString for IANA named-zone strings onlytimeZoneOffsetFromNumber for fixed-offset zones encoded as numbersSignature
declare const timeZoneFromString: Transformation<DateTime.TimeZone, string, never, never>
Since v4.0.0