DateTime::Event API suggestion, based loosely on the DateTime::TimeZone API:
my $ev_sr = DateTime::Event->new( name => 'Sunrise/sunrise' ); my $ev_ss = DateTime::Event->new( name => 'Sunrise/sunset' ); my $ev_ea = DateTime::Event->new( name => 'Easter' ); my $dt_set = $ev_sr->as_set; my @dt_ary = $ev_sr->as_list( during => $dt_span ); print $ev_sr->name; # 'sunrise' print $ev_sr->freq; # 'daily' (?) $next_sr = $ev_sr->next_for_datetime( $dt ); .. and so on. - Flavio S. Glock