getLocaleDateFormat

function experimental

npm Package @angular/common
Module import { getLocaleDateFormat } from '@angular/common';
Source common/src/i18n/locale_data_api.ts

function getLocaleDateFormat(locale: string, width: FormatWidth): string;

Description

Date format that depends on the locale.

There are four basic date formats:

  • full should contain long-weekday (EEEE), year (y), long-month (MMMM), day (d).

    For example, English uses EEEE, MMMM d, y, corresponding to a date like "Tuesday, September 14, 1999".

  • long should contain year, long-month, day.

    For example, MMMM d, y, corresponding to a date like "September 14, 1999".

  • medium should contain year, abbreviated-month (MMM), day.

    For example, MMM d, y, corresponding to a date like "Sep 14, 1999". For languages that do not use abbreviated months, use the numeric month (MM/M). For example, y/MM/dd, corresponding to a date like "1999/09/14".

  • short should contain year, numeric-month (MM/M), and day.

    For example, M/d/yy, corresponding to a date like "9/14/99".

© 2010–2018 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v5.angular.io/api/common/getLocaleDateFormat