API Reference@grafana/dataintervalToAbbreviatedDurationString

intervalToAbbreviatedDurationString() function

intervalToAbbreviatedDurationString() function

intervalToAbbreviatedDurationString converts interval to readable duration string

Signature

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

Import

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