UNPKG

ts-py-datetime

Version:

Datetime handling the python way (or as close as possible), now with TypeScript

11 lines (10 loc) 440 B
export declare const DatetimeIntervals: ("year" | "month" | "day" | "hour" | "minute" | "second" | "millisecond")[]; export type DatetimeInterval = (typeof DatetimeIntervals)[number]; export type DatetimeParams = Partial<Record<DatetimeInterval, number> & { utc: boolean; }>; export type TimeSpec = 'auto' | 'hours' | 'minutes' | 'seconds' | 'milliseconds'; export type ISOFormatParams = { sep?: string; timespec?: TimeSpec; };