DateTime::Event::Recurrence works just like a DateTime::Set. It inherits the as_list function from DateTime::Set which you could use:
use DateTime; use DateTime::Event::Recurrence; use strict; my $dt = DateTime->now(); $dt->set(hour=>0, minute=>0, second=>0, day=>1); my $weekly_set = DateTime::Event::Recurrence->weekly ( days => 4); print "$_\n" foreach $weekly_set->as_list(start=>$ dt, before=>$dt->clone->add(months=>1)); __END__ On Mon, Dec 14, 2009 at 2:02 PM, Janaki Kuruppu <jkuru...@gmail.com> wrote: > if i understand correctly, the following should generate a set of dates for > "every week on Thursday" > > my $weekly_set = DateTime::Event::Recurrence->weekly ( days => 4); > > can someone tell me how to access these dates? are they in an array? a > hash? how to get them out to use them in my script? for instance, i > really > just want the dates of the four thursdays for the current month... > > thanks, and sorry for such a simplistic question - it's not clear from the > documentation, at least, not to me... > Janaki > -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ >