UNPKG

@coinmeca/ui

Version:

This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

22 lines 714 B
export type Time = 'secs' | 'days' | 'weeks' | 'months' | 'years'; export type Duration = [duration: number, type?: Time] | [start: number, end: number, type?: Time]; export type Date = { [key in Time]: number; }; type TimeFunctions = { [key in Time]: (time: number) => Date; }; type UseDate = TimeFunctions & { date: Date; now: number; end: number; when: (...args: Duration) => number; sec: (...args: Duration) => Date; day: (...args: Duration) => Date; week: (...args: Duration) => Date; month: (...args: Duration) => Date; year: (...args: Duration) => Date; }; export default function useTime(initial?: Date): UseDate; export {}; //# sourceMappingURL=useTime.d.ts.map