use warnings; use strict; use Date::Calc qw( Week_of_Year Monday_of_Week Month_to_Text ); # Date::Calc uses 1 = Monday, ... 7 = Sunday foreach my $date ( 1 .. 20 ) { my $week = Week_of_Year( 2005, 4, $date ); # see docs for caveats my ( $year, $month, $day ) = Monday_of_Week( $week, 2005 ); print "The Monday before April $date was ", Month_to_Text( $month ), " $day\n"; }