/** * Time formatting utilities. * * Consolidates the six near-duplicate `formatRelativeTime` helpers that * previously lived inline across views and widgets (each with subtle * divergences in suffix, date fallback, and input type). * * @since v2.11.x */ export interface RelativeTimeOptions { /** Append " ago" suffix after unit (default: true). */ suffix?: boolean; /** * When the delta exceeds 7 days, fall back to `Date.toLocaleDateString()` * instead of continuing to count days (default: false). */ dateFallback?: boolean; } /** * Format a past timestamp as human-readable relative time. * * Accepts ms timestamp (number), ISO date string, or Date. * * @example * formatRelativeTime(Date.now() - 5000) // 'just now' * formatRelativeTime(Date.now() - 120_000) // '2m ago' * formatRelativeTime(Date.now() - 7200_000, { suffix: false }) // '2h' * formatRelativeTime(someIsoString, { dateFallback: true }) // '3/15/2026' after 7d */ export declare function formatRelativeTime(when: number | string | Date, options?: RelativeTimeOptions): string; //# sourceMappingURL=time-format.d.ts.map