UNPKG

ts-prime

Version:

A utility library for JavaScript and Typescript.

42 lines 952 B
import { DeepPartial } from "./types"; interface PrettyMs { days: { unit: string; }; hours: { unit: string; }; minutes: { unit: string; }; seconds: { unit: string; }; } export declare namespace Time { /** * Converts seconds to milliseconds */ function Second(seconds: number): number; /** * Converts minutes to milliseconds */ function Minute(minutes: number): number; /** * Converts hours to milliseconds */ function Hour(h: number): number; /** * Converts days to milliseconds */ function Day(d: number): number; } export declare function prettyMs(milliseconds: number, options?: DeepPartial<PrettyMs>): string; /** * * @param date * @param from - {optional} time diff */ export declare function prettyTimeDiff(date: number | Date | string, from?: number): string; export {}; //# sourceMappingURL=time.d.ts.map