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

Function dateStrGetter

packages/common/src/i18n/format_date.ts:373–382  ·  view source on GitHub ↗

* Returns a date formatter that transforms a date into its locale string representation

(
  name: TranslationType,
  width: TranslationWidth,
  form: FormStyle = FormStyle.Format,
  extended = false,
)

Source from the content-addressed store, hash-verified

371 * Returns a date formatter that transforms a date into its locale string representation
372 */
373function dateStrGetter(
374 name: TranslationType,
375 width: TranslationWidth,
376 form: FormStyle = FormStyle.Format,
377 extended = false,
378): DateFormatter {
379 return function (date: Date, locale: string): string {
380 return getDateTranslation(date, locale, name, width, form, extended);
381 };
382}
383
384/**
385 * Returns the locale translation of a date for a given form, type and width

Callers 1

getDateFormatterFunction · 0.85

Calls 1

getDateTranslationFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…