• Overview
@angular/common

getLocaleDateFormat

function
deprecatedsince v18

Retrieves a localized date-value formatting string.

Deprecation warning

Angular recommends relying on the Intl API for i18n. Use Intl.DateTimeFormat for date formating instead.

API

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

Angular recommends relying on the Intl API for i18n. Use Intl.DateTimeFormat for date formating instead.

@paramlocalestring

A locale code for the locale format rules to use.

@paramwidthFormatWidth

The format type.

@returnsstring

The localized formatting string.

Jump to details