This is an alternative way to deliver a string version of a date value. In this case, it is formatted as a Date literal and can then be used in an eval() function to assign another date.
If you run the example below, it should yield something resembling this:
(new Date(961700949597))
Note that the date value is in milliseconds UTC time, and will vary, but you should see a very long number like that.
// Create a date object and display its source myObject = new Date(); document.write(myObject.toSource());
See also: | Date.prototype, Date.toString() |
Prev | Home | Next |
Date.toLocaleTimeString() | Up | Date.toString() |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |