in reply to Calculate down time of devices in prime time (only working hours, excluding p_holidays)

I just recently needed a similar report of business days that have passed for reporting and finally found date::calendar

The following is an example of taking two days and figuring out the delta of business days.

#!/usr/bin/perl use strict; use Date::Calendar; my $date_1 = [2003,9,24]; my $date_2 = [2003,10,9]; my $flag_1 = '1'; my $flag_2 = '0'; my $calendar = Date::Calendar->new({}); my $days = $calendar->delta_workdays($date_1,$date_2,$flag_1,$flag_2); print "$days\n";

There is also the ability to build your holiday list as well.

There is also Date::Business but I haven't given that a shot yet.