• Overview
@angular/common

getLocaleEraNames

function
deprecatedsince v18

Retrieves Gregorian-calendar eras for the given locale.

API

function getLocaleEraNames(
  locale: string,
  width: TranslationWidth,
): readonly [string, string];

getLocaleEraNames

readonly [string, string]

Retrieves Gregorian-calendar eras for the given locale.

@deprecated

Angular recommends relying on the Intl API for i18n. Use Intl.DateTimeFormat for date formating instead.

@paramlocalestring

A locale code for the locale format rules to use.

@paramwidthTranslationWidth

The required character width.

@returnsreadonly [string, string]
Jump to details