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

Function getLocaleDayPeriods

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

Source from the content-addressed store, hash-verified

268 * Use `Intl.DateTimeFormat` for date formating instead.
269 */
270export function getLocaleDayPeriods(
271 locale: string,
272 formStyle: FormStyle,
273 width: TranslationWidth,
274): Readonly<[string, string]> {
275 const data = ɵfindLocaleData(locale);
276 const amPmData = <[string, string][][]>[
277 data[ɵLocaleDataIndex.DayPeriodsFormat],
278 data[ɵLocaleDataIndex.DayPeriodsStandalone],
279 ];
280 const amPm = getLastDefinedValue(amPmData, formStyle);
281 return getLastDefinedValue(amPm, width);
282}
283
284/**
285 * Retrieves days of the week for the given locale, using the Gregorian calendar.

Callers 1

getDateTranslationFunction · 0.90

Calls 1

getLastDefinedValueFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…