UNPKG

reablocks

Version:
14 lines (13 loc) 526 B
export interface SafeFormatOptions { /** The date-fns format string used to format the absolute date. */ format: string; /** Whether to include seconds when computing the relative time string. */ includeSeconds?: boolean; /** Whether to append a suffix (e.g. "ago", "in") to the relative time string. */ addSuffix?: boolean; } export declare function safeFormat(date: Date | string | number | null | undefined, options: SafeFormatOptions): { dateObj: any; formatted: any; relative: any; };