MCPcopy Create free account
hub / github.com/Effect-TS/effect / encodeDatePayload

Function encodeDatePayload

packages/effect/src/Schema.ts:8121–8126  ·  view source on GitHub ↗
(date: globalThis.Date)

Source from the content-addressed store, hash-verified

8119}
8120
8121function encodeDatePayload(date: globalThis.Date): string {
8122 if (globalThis.Number.isNaN(date.getTime())) {
8123 throw new globalThis.RangeError(`Expected a valid Date, got ${format(date)}`)
8124 }
8125 return date.toISOString()
8126}
8127
8128/**
8129 * Validates that a Date is greater than the specified value (exclusive).

Callers 1

Schema.tsFile · 0.85

Calls 2

formatFunction · 0.90
getTimeMethod · 0.80

Tested by

no test coverage detected