• Overview
@angular/common

getLocaleDayPeriods

function
deprecatedsince v18

Retrieves day period strings for the given locale.

Deprecation warning

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

API

  
    function getLocaleDayPeriods(  locale: string,  formStyle: FormStyle,  width: TranslationWidth): readonly [string, string];
  
  

getLocaleDayPeriods

readonly [string, string]

Retrieves day period strings 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.

@paramformStyleFormStyle

The required grammatical form.

@paramwidthTranslationWidth

The required character width.

@returnsreadonly [string, string]
Jump to details