• Overview
@angular/common

getLocaleExtraDayPeriodRules

function
Deprecated

Retrieves locale-specific rules used to determine which day period to use when more than one period is defined for a locale.

  
    function getLocaleExtraDayPeriodRules(  locale: string): (Time | [Time, Time])[];
  
  

getLocaleExtraDayPeriodRules

(Time | [Time, Time])[]

Retrieves locale-specific rules used to determine which day period to use when more than one period is defined for a locale.

There is a rule for each defined day period. The first rule is applied to the first day period and so on. Fall back to AM/PM when no rules are available.

A rule can specify a period as time range, or as a single time value.

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. Let Intl.DateTimeFormat determine the day period instead.

@paramlocalestring

A locale code for the locale format rules to use.

@returns(Time | [Time, Time])[]
Jump to details