in reply to Help with dates
From the Perl Cookbook
use Date::Calc qw(Day_of_Week Week_Number Day_of_Year); # you have $year, $month, and $day # $day is day of month by definition $wday = Day_of_Week($year, $month, $day); $wnum = Week_Number($year, $month, $day); $dnum = Day_of_Year($year, $month, $day);
Update I read that backwords expected numeric to name. So how would we reverse it hmmmm.... I would go with shockme because depending on how deep you have to go back your function mishandles leap years.
|
|---|