Date.prototype.toLocaleDateString
Formats a date without time by language rules.
Available since: ES1
Syntax
date.toLocaleDateString(locales, options)Parameters
| Parameter | Type | Description |
|---|---|---|
| locales | string | Optional. The language and region, for example en-US, de-DE, ru-RU. |
| options | object | Optional. What to show: weekday, year, month, day, and also dateStyle and timeZone. |
Return value
stringThe date without time, formatted by the language rules.
Examples
One day in different countries:
const date = new Date(2026, 2, 15);
console.log(date.toLocaleDateString('en-US'));
console.log(date.toLocaleDateString('de-DE'));
console.log(date.toLocaleDateString('en-GB'));Output:
3/15/2026
15.3.2026
15/03/2026With the month and weekday names:
const date = new Date(2026, 2, 15);
console.log(date.toLocaleDateString('en-US', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }));
console.log(date.toLocaleDateString('en-US', { dateStyle: 'medium' }));Output:
Sunday, March 15, 2026
Mar 15, 2026Notes
Without locales the browser language is used, so different users see different results. To format many dates it is faster to create one Intl.DateTimeFormat.
See also
- Date.prototype.toLocaleString — Formats a date together with the time by language rules.
- Date.prototype.toLocaleTimeString — Formats a time without the date by language rules.
- Intl.DateTimeFormat — Formats dates and times by language rules.
Related recipes
In the tutorial
- Formatting with Intl — Locale-aware formatting of numbers, money, dates and plural words in JavaScript: toLocaleString, Intl.NumberFormat, Intl.DateTimeFormat and Intl.PluralRules.