• 개요
@angular/common

getLocaleEraNames

함수
사용 중단 권고v18.0부터

Retrieves Gregorian-calendar eras for the given locale.

사용 중단을 권고합니다.

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

API

function getLocaleEraNames(
  locale: string,
  width: TranslationWidth,
): readonly [string, string];
@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]

An array of localized era strings. For example, [AD, BC] for en-US.

상세 내용으로 이동