UNPKG

@technobuddha/library

Version:
20 lines (19 loc) 608 B
/** * Options for the {@link relativeTime} function * @group Time * @category Relative Time */ export type DurationOptions = { /** Number of decimal places for seconds */ fractionDigits?: number; }; /** * Describe duration between two dates in a simple format * @param start - The date * @param finish - The date to compare to * @param options - see {@link DurationOptions} * @returns string describing the duration between the two dates * @group Time * @category Relative Time */ export declare function duration(start: Date, finish: Date, { fractionDigits }?: DurationOptions): string;