in reply to Re: Resetiing business day
in thread Resetiing business day
Yah, You are right. I found a way to do that. Here is modified code.
use Date::Business;
my %start;
my $n=1;
my $temp_bd;
my $d = new Date::Business();
while ($n <=10)
{
$temp_bd= new Date::Business($d);
$temp_bd->addb(2);
$start{'date'}= $temp_bd->image();
$start{'date1'}= $d->image();
print "\n Date- $start{'date'}";
print "\n Date1- $start{'date1'}";
$n++;
}
Just new object had to start with original using method of package instead of assignment operator.
|
|---|