Date.prototype.toDateString() returns the date portion of a Date as a human-readable string interpreted in the local time zone. It omits the time and time-zone offset from the returned text.
Syntax:
date.toDateString();
Example:
const date = new Date(2026, 8, 10, 14, 30);
console.log(date.toDateString()); // Thu Sep 10 2026
The method returns a string such as Thu Sep 10 2026. The exact date depends on the Date value after it is interpreted in the host’s local time zone.
const date = new Date("2026-09-10T20:00:00Z");
const text = date.toDateString();
console.log(text);
console.log(typeof text); // "string"
toString() includes both local date and local time information. toDateString() keeps only the date portion.
const date = new Date(2026, 8, 10, 14, 20, 30);
console.log(date.toDateString());
console.log(date.toString());
toLocaleDateString() is the better choice when the displayed date should follow a language, region, named time zone, or formatting options. toDateString() offers no locale/options arguments.
const date = new Date(2026, 8, 10);
console.log(date.toDateString());
console.log(date.toLocaleDateString("en-IN"));
A Date object itself does not have String methods such as slice(). Apply them to the returned string.
const date = new Date();
const text = date.toDateString();
console.log(text.slice(4));
toDateString() uses the local time zone. The same timestamp may therefore display a different calendar date on computers in different zones.
Do not use this human-readable output as a storage or interchange format. For a stable UTC machine-readable representation, use toISOString(). For user-facing localized output, use toLocaleDateString() or Intl.DateTimeFormat.
const date = new Date();
console.log(date.toISOString()); // stable UTC ISO 8601 string
Next: toLocaleDateString() Date Reference
Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.