On Wed, 11 Jun 2003, Tim Bunce wrote: > > > And I'll repeat my (carefully worded) statement that "A single > > > regex could handle all formats that follow the ISO 8601 general > > > left-to-right decreasing resolution style, with assorted optional > > > punctuation, plus optional appended TZ." > > > > In fact, this'd be pretty much what Date::Parse does ;) > > Parse::Date is limited to dates that Time::Local can handle. > (It also uses Time::Zone for named timezones.)
Only the str2time function uses T::L. And that's only so it can return an epoch. The strptime function, which does all the work, doesn't need it. > I'd say rip the guts out and stuff it in a new module focused on working > with DateTime. Drop anything that gets in the way (like Time::Local), > two digit years, and perhaps named timezones. Supporting Olson time zones should be too hard, since it's just a string match [a-zA-Z0-9/] at the beginning or end. -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/