Date.prototype.toLocaleString()
Returns the date and time formatted for a locale.
Syntax
date.toLocaleString(locales, options)
Returns
string — A locale-aware date and time string.
Examples
const d = new Date("2026-05-15T14:30:00Z");
console.log(
d.toLocaleString("en-US", { timeZone: "UTC" })
);
Output
5/15/2026, 2:30:00 PM
const d = new Date("2026-05-15T14:30:00Z");
console.log(
d.toLocaleString("en-GB", { timeZone: "UTC" })
);
Output
15/05/2026, 14:30:00
Notes
- Combines date and time according to the locale and options.
- Output varies by environment locale/time-zone data.
- For finer control consider `Intl.DateTimeFormat`.
Browser & runtime support
| Environment | Since version |
|---|---|
| chrome | 24 |
| firefox | 29 |
| safari | 10 |
| edge | 12 |
| node | 0.12 |