localTimeFormat() function
localTimeFormat() function
localTimeFormat helps to generate date formats for momentjs based on browser’s locale
Signature
export declare function localTimeFormat(options: Intl.DateTimeFormatOptions, locale?: string | string[] | null, fallback?: string): string;
Import
import { localTimeFormat } from '@grafana/data';
Parameters
Parameter | Type | Description |
---|---|---|
options | Intl.DateTimeFormatOptions | DateTimeFormatOptions to format date |
locale | string | string[] | null | browser locale, or default |
fallback | string | default format if Intl API is not present |
Returns:
string