Javascript Reference - JavaScript toDateString() Method








toDateString() displays the date's day of the week, month, day of the month, and year.

Browser Support

toDateString() Yes Yes Yes Yes Yes

Syntax

dateObject.toDateString();

Parameters

None.

Return Value

A string representing the date as a string.





Example


var aDate = new Date(Date.UTC(2021, 5, 4, 12, 21, 55)); 
console.log(aDate.toDateString()); 

The code above generates the following result.