parseDuration() function
parseDuration() function
parseDuration parses duration string into datefns Duration object
Signature
export declare function parseDuration(durationString: string): Duration;
Import
import { parseDuration } from '@grafana/data';
Parameters
Parameter | Type | Description |
---|---|---|
durationString | string | string to convert. For example ‘2m’, ‘5h 20s’ |
Returns:
Duration