Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
intervalToAbbreviatedDurationString() function
intervalToAbbreviatedDurationString() function
intervalToAbbreviatedDurationString convers interval to readable duration string
Signature
export declare function intervalToAbbreviatedDurationString(interval: Interval, includeSeconds?: boolean): string;
Import
import { intervalToAbbreviatedDurationString } from '@grafana/data';
Parameters
Parameter | Type | Description |
---|---|---|
interval | Interval | interval to convert |
includeSeconds | boolean | optional, default true. If false, will not include seconds unless interval is less than 1 minute |
Returns:
string