Loading ...
Sorry, an error occurred while loading the content.

ECMAScript 5 spec - toISOString vs toJSON

Expand Messages
  • joel.finch@ymail.com
    I noticed in the latest ECMAScript 5 spec that Date s toJSON is defined to return the same string as Date s toISOString. (as of:
    Message 1 of 1 , Jul 5, 2009
    View Source
    • 0 Attachment
      I noticed in the latest ECMAScript 5 spec that Date's toJSON is defined to return the same string as Date's toISOString. (as of: candidate-draft-tc39-2009-025_errata-5-19)

      Does this mean that toISOString should now be defined to return "null" for NaN dates, or that the strict 1:1 correspondence between toISOString and toJSON should be relaxed?

      I'm sorry to keep raising the issue of NaN dates, it's truly not all I think about, I just don't want to head into our bold new scriptalicious future with wiggle room for implementors.
    Your message has been successfully submitted and would be delivered to recipients shortly.