Dave Rolsky wrote an article a while back about how there are too many date-handling modules in CPAN. When I read it, I thought, "Absolutely, an overhaul is really needed."
Tonight I was reminded once again how bad the situation really is. There are too many modules, alternating between too much and too little. (Just "too", as in "too many notes!") What happened to "simple things should be simple, complicated things should be possible"?
I had six rows of dates, and all I wanted was, "Give me the next business day". After twenty minutes of floundering around with Date::Calc and Date::Calendar and their kin, I gave up, and just looked up each row in a real calendar: "Lessee, Memorial day is the 26th, so it's Tuesday."
I know someone will post a reply of "Just use Date::Foobar" or "In Date::Calc, just get the date in Tasmania and subtract the phase of the moon." You know what? By the time I got through the docs, wading through how to figure the Coptic calendar and the umpteen routines to calculate Easter, I was just too fed up to continue. Do the people that wrote this stuff really use it? Or did they just throw the kitchen sink in there because they could?
I hope the DateTime group makes things better, but frankly, glancing at the modules page makes me wonder if they're just adding fuel to the fire. "Baby Time"? "Pataphysical Calendar"? Yeah, those will be really useful.
Well, actually, you happen to pick one of the harder problems just then. You can state the problem easily, but then you have to answer a lot of questions:Give me the next business day
Re:"next business day" is a hard problem
VSarkiss on 2003-05-16T14:29:53
Exactly, I realize it's nontrivial; that's why I went to find a module rather than roll my own. My point was that the interface and documentation were so complicated that the modules ended up not being of any help. As a contrasting example, CGI parameter parsing can be tricky, but CGI.pm packages up the difficulty for you, giving you a simple interface. That's not the case here.
Re:Not too much
jplindstrom on 2003-05-16T22:08:53
...and can send e-mail:) Re:Not too much
pne on 2003-05-21T06:37:24
...and can interface to a database;) Re:Not too much
chaoticset on 2003-05-21T15:08:27
Don't forget a graphics library!
Re:Date::Manip
barbie on 2003-05-19T11:19:03
Except that its huge and written in pure Perl, thus can be slower than smaller modules or ones written in C.However, as I have yet to find a working Win32 version of DateTime, Date::ICal does a pretty good job.