[Zope3-dev] Re: date parsing: explicit is better
Stephan Richter
stephan.richter@tufts.edu
Fri, 22 Nov 2002 12:54:08 -0500
On Friday 22 November 2002 12:41, Shane Hathaway wrote:
> Are you sure we need that? I would expect that we only need methods
> like "parse this date string in the configured locale, returning a
> datetime" and "format this currency in the configured locale". There
> might be a "MultipleLocaleService", as you suggest, but that's distinct
> from the LocaleService.
>
> The LocaleService might *use* your MultipleLocaleService, but it doesn't
> have to. To start out, it could blindly assume a hybrid of US and
> European conventions, later becoming smarter. This makes writing the
> basic locale service a lot easier.
Right, I understand your assertion here. However, I think writing a simple
LocaleService is not that bad, but if we make it too simple we have to
refactor later a lot. Furthermore, I do not think it gives us any advantage
to implement specific format parsers at this time. I think this could really
backfire and people start writing all their custom parsers and formatters and
at the end we have a big mess.
Furthermore, there is not much need for prototyping, since the issue is well
understood and solved (just not in a Python implementation).
BTW, there is a PICU (Perl ICU implementation) that only concentrated on
implementing the features we also need. So maybe we should just use the Perl
and convert it.
Regards,
Stephan
--
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training