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

Function getLocaleMonthNames

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

Source from the content-addressed store, hash-verified

336 * Use `Intl.DateTimeFormat` for date formating instead.
337 */
338export function getLocaleMonthNames(
339 locale: string,
340 formStyle: FormStyle,
341 width: TranslationWidth,
342): ReadonlyArray<string> {
343 const data = ɵfindLocaleData(locale);
344 const monthsData = <string[][][]>[
345 data[ɵLocaleDataIndex.MonthsFormat],
346 data[ɵLocaleDataIndex.MonthsStandalone],
347 ];
348 const months = getLastDefinedValue(monthsData, formStyle);
349 return getLastDefinedValue(months, width);
350}
351
352/**
353 * Retrieves Gregorian-calendar eras for the given locale.

Callers 2

getDateTranslationFunction · 0.90

Calls 1

getLastDefinedValueFunction · 0.85

Tested by

no test coverage detected