Date.toDateString

toDateString – Converts a Date object to a string.

Description

Date.toDateString()

Interpreters might implement the result of toDateString to give different return values, it is recomended to use the toLocaleDateString method instead.

Return values

string primitive.

Examples

Example #1 – toDateString example
var date = new Date(); console.log(date.toDateString()); // Returns a string representation of the given date.

See also

External references