Date::Calc comes to mind:
use strict; use warnings; use Date::Calc qw( Today Day_of_Week Add_Delta_Days Date_to_Text ); my $monday_day_of_wk = 1; my @today = Date::Calc::Today(); my $current_day_of_wk = Day_of_Week( @today ); $current_day_of_wk += 7 if $current_day_of_wk < $monday_day_of_wk; my @day = Add_Delta_Days( @today, $monday_day_of_wk - $current_day_of_ +wk ); for ( 1..7 ) { print Date_to_Text( @day ), "\n"; @day = Add_Delta_Days( @day, 1 ); } __END__ Mon 20-Jun-2005 Tue 21-Jun-2005 Wed 22-Jun-2005 Thu 23-Jun-2005 Fri 24-Jun-2005 Sat 25-Jun-2005 Sun 26-Jun-2005
the lowliest monk
In reply to Re: Findout the day range of the current week
by tlm
in thread Findout the day range of the current week
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |