Skip to main content Link Menu Expand (external link) Document Search Copy Copied

DateFromISOString overview

Added in v0.5.0


Table of contents


DateFromISOStringC (interface)

Signature

export interface DateFromISOStringC extends t.Type<Date, string, unknown> {}

Added in v0.5.0

DateFromISOString

Signature

export const DateFromISOString: DateFromISOStringC = ...

Example

import { DateFromISOString } from 'io-ts-types/lib/DateFromISOString'
import { right } from 'fp-ts/lib/Either'

const date = new Date(1973, 10, 30)
const input = date.toISOString()
assert.deepStrictEqual(DateFromISOString.decode(input), right(date))

Added in v0.5.0