[Haskell-cafe] Help parsing dates and times

Justin Bailey jgbailey at gmail.com
Tue Oct 16 12:25:05 EDT 2007


On 10/16/07, Bjorn Bringert <bringert at cs.chalmers.se> wrote:
>
>
> Should we just add XX:XX as an alternative time zone offset format
> accepted by %z and %Z? Is this a standard format?


I'm not sure, but I am getting this date from Google in their XML feeds
representing calendar data. The specific element is "gd:when", documented
here:

http://code.google.com/apis/gdata/elements.html#gdWhen

Hmm, ok, parsedate allows garbage at the end. I wonder what is the
> right thing to do here.


A wildcard that allowed me to say "don't care" would work. If parseDate was
built on regular expressions, then you could do whatever you wanted. I'm not
familiar with the C roots of this function, though, so maybe it's best to do
whatever it does.

Regardless, I'm glad to have something. I can always filter/chop the string
to remove the bits I don't care about. It's a good library.

Justin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20071016/d517c774/attachment-0001.htm


More information about the Haskell-Cafe mailing list