W3cubDocs

/Angular 10

getLocaleExtraDayPeriodRules

function

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

See more...

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

Parameters
locale string

A locale code for the locale format rules to use.

Returns

(Time | [Time, Time])[]: The rules for the locale, a single time value or array of from-time, to-time, or null if no periods are available.

See also

Description

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".

© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v10.angular.io/api/common/getLocaleExtraDayPeriodRules