[squeak-dev] Date and Time parsing from String

Alexander Lazarević laza at blobworks.com
Tue Sep 1 11:49:40 UTC 2009


I think this is a good addition and tried to copy the versions to the trunk.
Now source.squeak.org seems to be dead. :-]

Alex

On Tue, Sep 1, 2009 at 11:44 AM, Tim Felgentreff <tim at nada1.de> wrote:

> Hello
>
> Some time ago when I was parsing a lot of date+time strings from the web I
> came across quite a few who did not quite adhere to standards, so they would
> sometimes not get parsed properly.
> Currently the logic in parsing dates in "Date>>readFrom:" and times in
> "Time>>readFrom:" isnot used in "DateAndTime>>readFrom:", so I thought why
> not have the code in one place only and make it a bit more forgiving.
> So I added nanoSecond parsing to the Time>>readFrom: and ISO8601-format
> parsing to Date>>readFrom:. Now DateAndTime>>readFrom: just uses those two
> methods and only parses the optional offset at the end.
> The tests run through and I also added one test and changed another to test
> the "new" format allowed for Date and Time respectively.
> I'm not sure if something as this should be changed just like that, but I
> thought offering it can't hurt.
>
> --
> Regards, Tim
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20090901/502fa068/attachment.htm


More information about the Squeak-dev mailing list