effect-io-ai

Package: effect
Module: SchemaTransformation

SchemaTransformation.dateTimeUtcFromString

Decodes a date-time string into a DateTime.Utc and encodes it back to an ISO string.

When to use

Use when you need a schema transformation to decode date-time strings to a normalized DateTime.Utc and encode back as a UTC ISO string.

Details

Decode accepts strings supported by DateTime.make, converts the result to UTC, and fails with InvalidValue when parsing fails. Encode uses DateTime.formatIso.

See

Signature

declare const dateTimeUtcFromString: Transformation<DateTime.Utc, string, never, never>

Source

Since v4.0.0