UNPKG

627 BTypeScriptView Raw
1/**
2 * The namespace for date functions.
3 */
4export declare namespace Time {
5 /**
6 * Convert a timestring to a human readable string (e.g. 'two minutes ago').
7 *
8 * @param value - The date timestring or date object.
9 *
10 * @returns A formatted date.
11 */
12 function formatHuman(value: string | Date): string;
13 /**
14 * Convert a timestring to a date format.
15 *
16 * @param value - The date timestring or date object.
17 *
18 * @param format - The format string.
19 *
20 * @returns A formatted date.
21 */
22 function format(value: string | Date, timeFormat?: string): string;
23}