[Dojo-interest] dojo.date.setIso8601() does not support space
date/time separator
Alex Russell
alex at dojotoolkit.org
Sat Apr 22 22:10:57 MDT 2006
Actually, I merged a fix for the "split by space" issue, but the regexp
may well still be b0rken.
On Thursday 20 April 2006 6:08 pm, Dylan Schiemann wrote:
> 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.
>
> Thanks,
> -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
>
> _______________________________________________
> Dojo FAQ: http://dojo.jot.com/FAQ
> Dojo-interest at dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
--
Alex Russell
alex at jot.com
alex at dojotoolkit.org BE03 E88D EABB 2116 CC49 8259 CF78 E242 59C3 9723
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://dojotoolkit.org/pipermail/dojo-interest/attachments/20060422/b9f82afe/attachment.pgp
More information about the Dojo-interest
mailing list