Menu

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.

Enterprise Open source

intervalToAbbreviatedDurationString() function

intervalToAbbreviatedDurationString() function

intervalToAbbreviatedDurationString converts interval to readable duration string

Signature

typescript
export declare function intervalToAbbreviatedDurationString(interval: Interval, includeSeconds?: boolean): string;

Import

typescript
import { intervalToAbbreviatedDurationString } from '@grafana/data';

Parameters

ParameterTypeDescription
intervalIntervalinterval to convert
includeSecondsbooleanoptional, default true. If false, will not include seconds unless interval is less than 1 minute

Returns:

string