Skip to content

Date.prototype.toLocaleDateString() method ​

The toLocaleDateString() method writes a Date as text according to a locale. It uses the same machinery as Intl.DateTimeFormat; when no fields or styles are given, it writes only the date.

Syntax ​

toLocaleDateString()
toLocaleDateString(locales)
toLocaleDateString(locales, options)

Parameters ​

locales optional

Same as for the Intl.DateTimeFormat() constructor.

options optional

Same as for the Intl.DateTimeFormat() constructor. timeStyle is not accepted.

Return value ​

A string. An invalid date doesn't throw; it returns 'Invalid Date'.

Exceptions ​

Same as for the Intl.DateTimeFormat() constructor.

In addition, giving timeStyle in options throws TypeError: timeStyle is specified while formatting date is requested.

Default output of the three methods ​

MethodWhen no fields or styles are givenen-US example
toLocaleString()Date and time11/15/2026, 3:05:09 PM
toLocaleDateString()Date only11/15/2026
toLocaleTimeString()Time only3:05:09 PM

Examples ​

js
const moment = new Date(Date.UTC(2026, 0, 5, 3, 4, 5));
console.log(moment.toLocaleDateString('de-DE', { timeZone: 'UTC' }));

Result: the console prints 5.1.2026.

Differences from the web ​

The same as the differences for Intl.DateTimeFormat; see Intl.DateTimeFormat.

See also ​