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

RE: [ydn-javascript] DateTime format

Expand Messages
  • Satyen Desai
    Hi Arnaud, Currently YUI does not have a utility specifically for the conversion you refer to - JavaScript Date to/from ISO 8601. The JSON parser
    Message 1 of 2 , Dec 27, 2007
      Hi Arnaud,

      Currently YUI does not have a utility specifically for the conversion
      you refer to - JavaScript Date to/from ISO 8601.

      The JSON parser (http://developer.yahoo.com/yui/json/) shipped with YUI
      uses the ISO based UTC format "YYYY-MM-DDThh:mm:ssZ" for serialization
      so you could go one way (JavaScript Date object to ISO string) using it.

      NOTE: The JSON.parse(s, filter) method allows you to add you own filter
      conversion function when "deserializing" a string which you could use to
      parse the above string format back into a Date Object - but it's not
      built in. You'd need to write your own filter function (which you could
      just as easily invoke directly as opposed to going through JSON.parse).

      If you'd like to see built in support for two way ISO 8601 conversion
      included in a future release, please file a feature request for it on
      SourceForge, and we can evaluate it when drawing out the YUI roadmap.

      Regards,
      Satyen
    Your message has been successfully submitted and would be delivered to recipients shortly.