Subject: | Calculates bad numbers |
Date: | Wed, 12 Mar 2008 21:58:46 -0700 |
To: | bug-DateTime-BusinessHours [...] rt.cpan.org |
From: | Kraig <k [...] xmltok.com> |
Looks like there is a few other problems with this as well
#!/usr/bin/perl
use DateTime::BusinessHours;
use DateTime;
my $datetime1=DateTime->new(year=>2007,month=>10,day=>15, hour=>12);
my $datetime2=DateTime->new(year=>2007,month=>10,day=>15, hour=>15);
my $testing = DateTime::BusinessHours->new(datetime1=>$datetime1,
datetime2=>$datetime2,
worktiming=>[9,18], # 9 am to 6 om
weekends=>[6,7], #saturday , sunday
);
print $testing->getdays."\n"; # the total business days
print $testing->gethours."\n"; # the total business hours
Results in:
0
-6