• Overview
@angular/common

getLocaleDateTimeFormat

function
deprecatedsince v18

Retrieves a localized date-time formatting string.

API

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

getLocaleDateTimeFormat

string

Retrieves a localized date-time formatting 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
Jump to details