Re: [grepmail-devel] Grepmail patch to merge DP and DM
Brought to you by:
coppit
From: Seth C. <se...@or...> - 2000-05-10 20:18:49
|
At 12:57 PM 05/10/2000 -0400, you wrote: >Hey Seth. This week is pretty busy, but I'll roll your changes in as soon as I >can. No rush. I started it on a whim, put off other stuff to finish it (just cause I was enjoying do it) but really, it's not a big deal... functionally it doesn't add anything new. > I think I need to get used to the idea of "auto-detecting" whether >Date::Manip or Date::Parse needs to be used -- but I guess that's what we have >to do. > >Hm... On second thought, maybe we should try to parse the date using >Date::Parse, and then fall back on Date::Manip? Like this: > >unless ($parsed_date = Date::Parse::parsedate($opts{d})) Will that work? I thought $opts(d) ends up being the complex date not the individual dates.... Maybe I'm wrong. >That way we could still support complex dates from the user, but the rest of >the code can be a lot simpler. (That's because we can use Date::Parse >internally all the time.) We can change our requirements from "either of >Date::Manip or Date::Parse" to "Date::Parse, and optionally Date::Manip if you >want complex dates". sure that would work... I think.... I realized that I probably missed a few things to check for ("ago"?) but that overall, it would work too. Personally I'd make the Date::Manip the required one... It's slower but it will work with anything. Date::Parse is more limited but fast. That's one reason I liked falling back on Manip, since regardless, I know if they have Manip installed, they can do anything. Seth |