export declare namespace humanDate { /** * Format: HH:mm:ss */ function time(date: Date | string | number): string; /** * Format: YYYY-MM-dd * * separator can change */ function date(date: Date | string | number, sp?: string): string; /** * Format: YYYY-MM-dd HH:mm:ss */ function datetime(date: Date | string | number): string; type ITimeFormatter = (s: number) => string; interface IFormatters { ms: ITimeFormatter; s: ITimeFormatter; m: ITimeFormatter; h: ITimeFormatter; d: ITimeFormatter; } /** * set format for time delta */ function setLocaleFormatter(formatter: Partial): void; /** * format time delta (in ms) to string, like: '1d' * when delta<=0, returns '0s' * * format can set by `setLocaleFormatter` * day is the largest unit */ function deltaTiny(from: number, to: number): string; function deltaTiny(ms: number): string; /** * format time delta (in ms) to string, like: '1d10m42s' * only return XXXms when delta<1min * when delta<=0, returns '0s' * * format can set by `setLocaleFormatter` * day is the largest unit */ function delta(from: number, to: number): string; function delta(deltaMs: number): string; } //# sourceMappingURL=to-string.d.ts.map