Export (0) Print
Expand All

Windows Runtime DateTime and TimeSpan Representations

The JavaScript representation of dates and times is different from the Windows Runtime version. The Windows Runtime DateTime structure is represented in JavaScript as a Date that has a backing store that matches the DateTime data (and has a different range and precision from the JavaScript Date). If you modify this custom Date object, it becomes a standard JavaScript Date and loses precision. JavaScript Date values can be passed to a Windows Runtime DateTime and will be range-checked, which might result in marshaling exceptions.

The Windows Runtime TimeSpan structure is converted to milliseconds and returned as a JavaScript number.

© 2015 Microsoft