#!/usr/bin/perl -w use Date::Manip::Date; use Date::Manip::Delta; $YEAR = $ARGV[0]; # 1st Wednesday $WED_STR_FMT = "1st Wednesday %b %Y"; $month = new Date::Manip::Date; $meet = new Date::Manip::Date; # 17 days $delta = new Date::Manip::Delta; $delta->set("delta", [0,0,0,17,0,0,0]); for ($month_num = 1; $month_num <= 12; $month_num++) { # parse the month in the form "YYYY-MM" $month->parse($YEAR . "-" . sprintf("%02d", $month_num)); # get the 1st Wednesday of the month $month_str = $month->printf($WED_STR_FMT); $meet->parse($month_str); # add 17 days $sat = $meet->calc($delta); # print out print $meet->printf("%B %Y\t%a %E, ") . $sat->printf("%a %E") . "\n"; }