MCPcopy Index your code
hub / github.com/angular/angular / getLocaleExtraDayPeriods

Function getLocaleExtraDayPeriods

packages/common/src/i18n/locale_data_api.ts:672–685  ·  view source on GitHub ↗
(
  locale: string,
  formStyle: FormStyle,
  width: TranslationWidth,
)

Source from the content-addressed store, hash-verified

670 * To extract a day period use `Intl.DateTimeFormat` with the `dayPeriod` option instead.
671 */
672export function getLocaleExtraDayPeriods(
673 locale: string,
674 formStyle: FormStyle,
675 width: TranslationWidth,
676): string[] {
677 const data = ɵfindLocaleData(locale);
678 checkFullData(data);
679 const dayPeriodsData = <string[][][]>[
680 data[ɵLocaleDataIndex.ExtraData][ɵExtraLocaleDataIndex.ExtraDayPeriodFormats],
681 data[ɵLocaleDataIndex.ExtraData][ɵExtraLocaleDataIndex.ExtraDayPeriodStandalone],
682 ];
683 const dayPeriods = getLastDefinedValue(dayPeriodsData, formStyle) || [];
684 return getLastDefinedValue(dayPeriods, width) || [];
685}
686
687/**
688 * Retrieves the writing direction of a specified locale

Callers 1

getDateTranslationFunction · 0.90

Calls 2

checkFullDataFunction · 0.85
getLastDefinedValueFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…