如何在 perl 中查找给定日期的前一个日期为 8 月 17 日。我可以使用下面的代码在 perl 中获取当前日期。有人可以帮我找到给定日期的前一个日期吗?
Given date as : Aug 17
Required Date as : Aug 16
#Reverting the Date for the respective TimeZone
my $timezone='london';
my ($dt, $Curr_Bus_Date,$Curr_day);
$dt = DateTime->now(time_zone => $timezone);
$Curr_mon=$dt->strftime('%b');
$Curr_date=$dt->strftime('%d');
$Curr_date=~s/^0/ /;
$Curr_dt="$Curr_mon $Curr_date ";
print "The curr date is $Curr_dt \n";