import { BoxProps, HoistProps } from '@xh/hoist/core'; interface RelativeTimestampProps extends HoistProps, BoxProps, RelativeTimestampOptions { /** * Property on context model containing timestamp. * Specify as an alternative to direct `timestamp` prop (and minimize parent re-renders). */ bind?: string; /** Date or milliseconds representing the starting time / time to compare. See also `bind`. */ timestamp?: Date | number; } export interface RelativeTimestampOptions { /** Allow dates greater than Date.now().*/ allowFuture?: boolean; /** Use shorter timestamp text, default true for mobile clients. */ short?: boolean; /** Label preceding timestamp.*/ prefix?: string; /** Appended to future timestamps. */ futureSuffix?: string; /** Appended to past timestamps. */ pastSuffix?: string; /** String to return when timestamps are within `epsilon`. */ equalString?: string; /** Threshold interval (in seconds) for `equalString`. */ epsilon?: number; /** String to return when timestamp is empty/falsy. */ emptyResult?: string; /** Time to which the input timestamp is compared. */ relativeTo?: Date | number; /** * Governs if calendar days should be used for computing return label rather than the native * moment 24-hour day. * * - Set to 'always' to ensure that any output less than 25 days will refer to the difference * in *calendar* days. * - Set to 'useTimeForSameDay' for a similar behavior, but showing time differences if the * two dates are on the same calendar day. * - Set to 'useTimeFor24Hr' for a similar behavior, but showing time differences for * any differences less than 24 hours. * * Null (default) will indicate that the standard behavior, based on moment, be used, whereby * 'day' refers simply to a 24-hour time period and has no relation to the calendar. */ localDateMode?: 'always' | 'useTimeForSameDay' | 'useTimeFor24Hr'; } /** * A component to display the approximate amount of time between a given timestamp and now in a * friendly, human-readable format (e.g. '6 minutes ago' or 'two hours from now'). * * Automatically updates on a regular interval to stay current. */ export declare const RelativeTimestamp: import("react").FC, relativeTimestamp: import("@xh/hoist/core").ElementFactory; /** * Returns a string describing the approximate amount of time between a given timestamp and the * present moment in a friendly, human-readable format. */ export declare function getRelativeTimestamp(timestamp: Date | number, options?: RelativeTimestampOptions): string; export {};