MCPcopy Create free account
hub / github.com/angular/angular / getLocaleEraNames

Function getLocaleEraNames

packages/common/src/i18n/locale_data_api.ts:367–374  ·  view source on GitHub ↗
(
  locale: string,
  width: TranslationWidth,
)

Source from the content-addressed store, hash-verified

365 * Use `Intl.DateTimeFormat` for date formating instead.
366 */
367export function getLocaleEraNames(
368 locale: string,
369 width: TranslationWidth,
370): Readonly<[string, string]> {
371 const data = ɵfindLocaleData(locale);
372 const erasData = <[string, string][]>data[ɵLocaleDataIndex.Eras];
373 return getLastDefinedValue(erasData, width);
374}
375
376/**
377 * Retrieves the first day of the week for the given locale.

Callers 1

getDateTranslationFunction · 0.90

Calls 1

getLastDefinedValueFunction · 0.85

Tested by

no test coverage detected