DateFromNumber overview
Added in v0.5.0
Table of contents
DateFromNumberC (interface)
Signature
export interface DateFromNumberC extends t.Type<Date, number, unknown> {}
Added in v0.5.0
DateFromNumber
Signature
export const DateFromNumber: DateFromNumberC = ...
Example
import { DateFromNumber } from 'io-ts-types/lib/DateFromNumber'
import { right } from 'fp-ts/lib/Either'
const date = new Date(1973, 10, 30)
const input = date.getTime()
assert.deepStrictEqual(DateFromNumber.decode(input), right(date))
Added in v0.5.0