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

Function getLocaleDayNames

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

Source from the content-addressed store, hash-verified

306 * Use `Intl.DateTimeFormat` for date formating instead.
307 */
308export function getLocaleDayNames(
309 locale: string,
310 formStyle: FormStyle,
311 width: TranslationWidth,
312): ReadonlyArray<string> {
313 const data = ɵfindLocaleData(locale);
314 const daysData = <string[][][]>[
315 data[ɵLocaleDataIndex.DaysFormat],
316 data[ɵLocaleDataIndex.DaysStandalone],
317 ];
318 const days = getLastDefinedValue(daysData, formStyle);
319 return getLastDefinedValue(days, width);
320}
321
322/**
323 * Retrieves months of the year for the given locale, using the Gregorian calendar.

Callers 2

getDateTranslationFunction · 0.90

Calls 1

getLastDefinedValueFunction · 0.85

Tested by

no test coverage detected