MCPcopy Create free account
hub / github.com/angular/angular / getLocaleDayPeriods

Function getLocaleDayPeriods

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

Source from the content-addressed store, hash-verified

276 * Use `Intl.DateTimeFormat` for date formating instead.
277 */
278export function getLocaleDayPeriods(
279 locale: string,
280 formStyle: FormStyle,
281 width: TranslationWidth,
282): Readonly<[string, string]> {
283 const data = ɵfindLocaleData(locale);
284 const amPmData = <[string, string][][]>[
285 data[ɵLocaleDataIndex.DayPeriodsFormat],
286 data[ɵLocaleDataIndex.DayPeriodsStandalone],
287 ];
288 const amPm = getLastDefinedValue(amPmData, formStyle);
289 return getLastDefinedValue(amPm, width);
290}
291
292/**
293 * 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