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
localTimeFormat() function
localTimeFormat() function
localTimeFormat helps to generate date formats for momentjs based on browser’s locale
Signature
typescript
export declare function localTimeFormat(options: Intl.DateTimeFormatOptions, locale?: string | string[] | null, fallback?: string): string;Import
typescript
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
Was this page helpful?
Related resources from Grafana Labs
Additional helpful documentation, links, and articles:
Scroll for more