JavaScript Date toDateString() Method
- Previous Page setUTCSeconds()
- Next Page toISOString()
- Go to Parent Directory JavaScript Date Reference Manual
Definition and Usage
toDateString()
This method converts the date part of a Date object (not the time) to a readable string.
Example
Convert today's date to a readable string:
var d = new Date(); var n = d.toDateString();
Syntax
Date.toDateString()
Parameters
No parameters.
Technical Details
Return value: | String, represent date as a string. |
---|
Browser Support
Method | Chrome | IE | Firefox | Safari | Opera |
---|---|---|---|---|---|
toDateString() | Support | Support | Support | Support | Support |
- Previous Page setUTCSeconds()
- Next Page toISOString()
- Go to Parent Directory JavaScript Date Reference Manual