UNPKG

@digital-magic/io-ts-local-date-time

Version:

LocalDate, LocalTime and TimeSlot types and utilities for TS

12 lines (11 loc) 507 B
import * as t from 'io-ts'; export declare const ISOLocalDateRegex: RegExp; export declare const LocalDate: t.BrandC<t.StringC, { readonly LocalDate: symbol; }>; export declare type LocalDate = t.TypeOf<typeof LocalDate>; export declare const localDate: (value: string) => t.Branded<string, { readonly LocalDate: symbol; }>; export declare const DateFromLocalDateDecoder: t.Decoder<LocalDate, Date>; export declare const dateFromLocalDateEncoder: (dateFormat: string) => t.Encoder<Date, LocalDate>;