[Dojo-interest] dojo.date.setIso8601() does not support space date/time separator

Dylan Schiemann mail at dylans.org
Thu Apr 20 19:08:55 MDT 2006

Hash: SHA1

This looks like a valid bug.  Can you please file a ticket:
http://trac.dojotoolkit.org/ , on the post 0.3 release as the milestone,
0.2 as the version.  It has a much greater chance of someone fixing the
issue by seeing it in trac.

- -Dylan

Anonymous Coward wrote:
> Hi,
> I see that the dojo.date.setIso8601() function splits the ISO datetime string on a T character. However, ISO8601 also allows a space to be used. So if that is added, Dojo would be able to parse more ISO8601 compliant dates.
> [00:12] <pokernut> I think there's a big in the function as well.
> [00:12] <pokernut> I'm trying to use it and it's not parsing it correctly.
> [00:12] <pokernut> I think the regex in setIso8601Date() is wrong
> I posted some improvements in the comments of this blog post: http://delete.me.uk/2005/03/iso8601.html
> afaik, this is what dojo.date was originally based on
> Additionally:
> When I do this:
> var date = new Date(d[1], 0, 1);
> alert(date);
> if (d[2]) { date.setUTCMonth(d[2] - 1); }
> alert(date);
> I get this (in Firefox):
> Sun Jan 01 2006 00:00:00 GMT+0100
> Wed Jun 01 2005 01:00:00 GMT+0200
> Note that by setting the month, the year changed. This probably depends on the locale, as for someone in the US the year did not change. Looks like by using setUTCMonth, Firefox triggers some kind of UTC representation internally, but re-uses the same data structure for that without converting it to the new representation. Or something.
> ~Grauw
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.opensymphony.com/thread.jspa?threadID=26722&messageID=52621#52621
> _______________________________________________
> Dojo FAQ: http://dojo.jot.com/FAQ
> Dojo-interest at dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the Dojo-interest mailing list