JavaScript Date toLocaleDateString() Method
- Previous Page toJSON()
- Next Page toLocaleTimeString()
- Go to the Previous Level JavaScript Date Reference Manual
Definition and Usage
toLocaleDateString()
The method uses regional conventions (locale conventions) to convert the date (not the time) of the Date object to a readable string.
Example
Use regional conventions to return the Date object as a string:
var d = new Date(); var n = d.toLocaleDateString();
Syntax
Date.toLocaleDateString()
Technical Details
Return Value: | A string representing a date in string format. |
---|---|
JavaScript Version: | ECMAScript 1 |
Browser Support
Method | Chrome | IE | Firefox | Safari | Opera |
---|---|---|---|---|---|
toLocaleDateString() | Support | Support | Support | Support | Support |
- Previous Page toJSON()
- Next Page toLocaleTimeString()
- Go to the Previous Level JavaScript Date Reference Manual