Name
Date.toString() — convert a Date to a string
Inherits from
Overrides Object.toString()
Synopsis
date
.
toString
()
Returns
A human-readable string representation of
date
, expressed in the local time
zone.
Description
toString()
returns a
human-readable, implementation-dependent string representation of
date
. Unlike toUTCString()
, toString()
expresses the date in the local
time zone. Unlike toLocaleString()
, toString()
may not represent the date and
time using locale-specific formatting.
Get JavaScript: The Definitive Guide, 6th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.