August 1999
Intermediate to advanced
1488 pages
72h 53m
English
date.toString()
The toString() method returns a string representation of the Date object in the local time zone.
Note
How does the toString() method differ from toGMTString() and toLocaleString()? Unlike the toGMTString() method, the toString() method displays the date in the local time zone. The toString() does not always display the date in the local format of the toLocaleString() method.
The code in Listing 6.111 creates a Date object from the current date and time. The toString() method is then used to display the date as a string in the local time zone.
Read now
Unlock full access