import type { TimePreset } from './presets'; interface CreateRangeLabelOptions { presets?: TimePreset[]; maxChars?: number; } /** * Creates an appropriate label for a time range, using a preset label if available. * @public * @param {String} earliest - The time string such as `rt` , `rtnow` or `-2h@m`. * @param {String} latest - The time string such as `rt` , `rtnow` or `-2h@m`. * @param {Object} [options] - An array of presents such as: * @param {Number} [options.maxChars = 0] - If the generated label is too long, it will abbreviate * to a more generic form, such as 'Between Date-times' instead of 'Feb 17, 2017 6:00 AM to Feb 18, 2017 12:20 AM'. * `Infinity` and `0` allow labels of any length. * @param {array} [options.presets] - An array of presents such as: * ``` * [ * { label: '30 second window', earliest: 'rt-30s', latest: 'rt' }, * { label: 'Today', earliest: '@d', latest: 'now' }, * { label: 'Previous year', earliest: '-1y@y', latest: '@y' }, * { label: 'Last 15 minutes', earliest: '-15m', latest: 'now' }, * { label: 'All time', earliest: '0', latest: '' }, * ] * ``` * @returns {String} Returns `'Custom time'` if one cannot be made. */ export declare const createRangeLabel: (earliest: string, latest: string, { presets, maxChars }?: CreateRangeLabelOptions) => string; export {}; //# sourceMappingURL=createRangeLabel.d.ts.map