use DateTime; use DateTime::Event::Recurrence; my $working_days = DateTime::Event::Recurrence->weekly( days => [1 .. 5] ); my $start = DateTime->new(year => 2004, month => 2, day => 1 ); my $end = DateTime->new(year => 2004, month => 2, day => 10 ); my $num_days = $working_days->as_list( start => $start, end => $end ); print $num_days;