• Overview
@angular/common

getLocaleExtraDayPeriods

function
Deprecated

Retrieves locale-specific day periods, which indicate roughly how a day is broken up in different languages. For example, for en-US, periods are morning, noon, afternoon, evening, and midnight.

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

getLocaleExtraDayPeriods

string[]

Retrieves locale-specific day periods, which indicate roughly how a day is broken up in different languages. For example, for en-US, periods are morning, noon, afternoon, evening, and midnight.

This functionality is only available when you have loaded the full locale data. See the "I18n guide".

@deprecated

Angular recommends relying on the Intl API for i18n. To extract a day period use Intl.DateTimeFormat with the dayPeriod option instead.

@paramlocalestring

A locale code for the locale format rules to use.

@paramformStyleFormStyle

The required grammatical form.

@paramwidthTranslationWidth

The required character width.

@returnsstring[]
Jump to details