How does JavaScript represent DateTime values internally?
<p>I'm working on a program that uses JavaScript for scripting.  Like most script systems, there's a predefined library of native functions that scripts can call into, and I just added a new one.</p>

<p>The new function takes a DateTime (it's in Delphi, where a DateTime is represented internally by a Double), a string and a boolean.  The last two parameters come through just fine, but it appears that somewhere in the system, the time value is getting mangled.  Instead of a recognizable DateTime, I get <code>1362394800000</code>, which doesn't make any sense according to Delphi's timestamp scheme.</p>

<p>Where can I find information on how JavaScript represents DateTime values, so I can figure out how to translate this into something my Delphi code can use?  (This is using Microsoft's JScript system that comes standard with Windows 7, in case the implementation varies.)</p>
