[Zope-Coders] Replace Zope2 DateTime._parse() with Zope3's DateTimeParser
Steve Alexander
steve@cat-box.net
Fri, 22 Nov 2002 14:36:09 +0000
Andreas Jung wrote:
> Just an idea:
>
> Since the DateTime parser of Zope 2 is broken for ages (e.g.
> "05.12.2002" is interpreted as May 12, 2002) I found the
> DateTimeParse module in Zope 3.
Why is this broken?
If the documentation says "parses ambiguous spec according to the US
convention" then I don't see it as being broken.
Then again, I'd much perfer a DateTime parser that raises an exception
on such ambiguous input, leaving it up to an application programer to be
explicit about whether the US convention is to be used or not.
> Does it have the same functionality
> as the exisiting parser in Zope 2? If yes, would it make sense to
> backport it for Zope 2 to get finally rid of DateTime._parse()?
In Zope 3, my suggestion could be implemented with an adapter that
adapts a generic DateTime parse to a USDateTime parse object.
--
Steve Alexander