August 1999
Intermediate to advanced
1488 pages
72h 53m
English
date.toSource()The toSource() method converts the Date object to a string that represents the source of the Date instance that was created.
Listing 6.110 creates a date object March 16, 2002. The toSource() method is then applied to the date object to return the source string "(new Date(1018986503234))" with the date expressed in milliseconds.
<script language="JavaScript1.3"> <!–– Hide //Create a Date object for March 16, 2002. theDate = new Date(2002,3,16,15,48,23,234); //Display "Tue Apr 16 15:48:23 GMT-0400 (Eastern Daylight Time) 2002" ... |
Read now
Unlock full access