On 7/13/03 6:47 AM, Eugene van der Pijll wrote: >> 1/20/2002 1:02 p.m. (okay, maybe a Euro-mode for dd/mm/yyyy :) > > 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! :) >> IOW, DateTime::Format::Simple should handle at least 90% of the dates a >> user is likely to encounter (or a person is likely to enter). > > If you want a parser that can handle 90% of all dates, call it > DateTime::Format::HideouslyComplex. 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. -John
