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

Function dateStrGetter

packages/common/src/i18n/format_date.ts:374–383  ·  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

372 * Returns a date formatter that transforms a date into its locale string representation
373 */
374function dateStrGetter(
375 name: TranslationType,
376 width: TranslationWidth,
377 form: FormStyle = FormStyle.Format,
378 extended = false,
379): DateFormatter {
380 return function (date: Date, locale: string): string {
381 return getDateTranslation(date, locale, name, width, form, extended);
382 };
383}
384
385/**
386 * 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