John Siracusa schreef:
> On 7/13/03 6:47 AM, Eugene van der Pijll wrote:
> > A parser that can parse this format correctly should not be called
> > Simple. As you say, it has to have a US and a Euro mode at least; the
> > default DateTime parser should be simple enough to need no
> > configuration.
> 
> I don't think it would be complex at all.  There's only one setting! :)

There's also the timezone (what does "EST" mean?), locale, and there are
other ambiguous date formats. How would you interpret "01/04/02", for
example?

And should it be able to parse "19 loka 2003"?

> See above.  It's like 4 or 5 regexes for DateTime::Format::Simple.  I know,
> because I have a DateTime wrapper that parses these formats, it it covers
> about *99.9%* of the date strings I encounter, including user input in web
> forms and such.

I'm impressed. What are those regexes? 

Eugene

Reply via email to