MCPcopy Index your code
hub / github.com/Effect-TS/effect / DateTimeUtcFromDate

Class DateTimeUtcFromDate

packages/effect/src/Schema.ts:6923–6931  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6921 * @since 3.12.0
6922 */
6923export class DateTimeUtcFromDate extends transformOrFail(
6924 DateFromSelf.annotations({ description: "a Date to be decoded into a DateTime.Utc" }),
6925 DateTimeUtcFromSelf,
6926 {
6927 strict: true,
6928 decode: (i, _, ast) => decodeDateTimeUtc(i, ast),
6929 encode: (a) => ParseResult.succeed(dateTime.toDateUtc(a))
6930 }
6931).annotations({ identifier: "DateTimeUtcFromDate" }) {}
6932
6933/**
6934 * Defines a schema that attempts to convert a `string` to a `DateTime.Utc` instance using the `DateTime.unsafeMake` constructor.

Callers

nothing calls this directly

Calls 3

transformOrFailInterface · 0.85
decodeDateTimeUtcFunction · 0.85
annotationsMethod · 0.65

Tested by

no test coverage detected