Return the Date object as a string, using locale conventions:
The result of n will be:
The toLocaleDateString() method converts the date (not the time) of a Date object into a readable string, using locale conventions.
![]()
The toLocaleDateString() method is supported in all major browsers.
| Type | Description |
|---|---|
| String | The date as a string |
| JavaScript Version: | 1.0 |
|---|
JavaScript Date Object
Your message has been sent to W3Schools.