getLocaleEraNames
function
deprecatedsince v18
Retrieves Gregorian-calendar eras for the given locale.
Deprecation warning
API
function getLocaleEraNames(
locale: string,
width: TranslationWidth,
): readonly [string, string];@paramlocale
stringA locale code for the locale format rules to use.
@returns
readonly [string, string]An array of localized era strings.
For example, [AD, BC] for en-US.
Jump to details