On Fri, 19 Dec 2003, Dave Rolsky wrote: > On Fri, 19 Dec 2003, Simon Cozens wrote: > > > [EMAIL PROTECTED] (Marco Marongiu) writes: > > > my $i = Date::Iterator->new( from => [2003,10,3], to => [2003,11,10] ) ; > > > while (my $day = $i->next) { ... } > > > > Marco, in case you're getting discouraged, I think there's certainly > > a place for Date::Iterator; I like it a lot, and I *really* like modules > > in the "modular" tradition that do one thing and one thing well, rather > > than modules in the "library" tradition that do everything to a reasonable > > degree. > > I agree, that's why the DateTime project is made up of many different > modules, each of which addresses a specific area. > > But the difference between the DateTime modules and Marco's module is that > the DateTime modules are specifically designed to work _together_. The > biggest problem with the date & time code on CPAN outside the DateTime > space is that while there are many problems solved, everybody has a > slightly different API, so it's hard to chain a set of modules together to > solve bigger problems. > > With the DateTime modules, you can pick and choose the pieces you need, > and still be sure that in the future, if you need to do more, you can > easily integrate other DateTime modules into your code. I think that's > far more modular than anything else out there. >
At the begining of this thread, I through Date::Iterator sounded great. My opinion on whether or not it should go into CPAN has gone back and forth. I happened to need something just like that, except I needed it to handle hour's as well. I offered to help add that to Date::Iterator. DateTime::Event::Recurrence was mentioned, so I thought I'd check it out (it's documentation doesn't make it seem nearly as easy as it should seem).It's easy enough to use, and works well as expected. There's a downside though... I had to install 13 other modules! Date::Iterator would only (I think) require Date::Calc. If all you need to do is Iterate over dates, Date::Iterator seems like a much better choice to me. Overhead is important in many situations. It would also be good for one off solutions. So I don't know. DateTime::Set and DateTime::Event::Recurrance could both use much better documentation, but I still see a place for Date::Iterator. For now, I'll be using DateTime::Event::Recurrance, because I need to deal with time based date sequences, and because I got in all installed. -- Josh I.