Howdy: Can someone clue me in as to how I can get the last Wednesday (or whatever) of the month?
I have an example of what *might* work, but I'm not sure how I can use it if, say, there are five Wednesdays in the Month. [snip from code] #!/usr/bin/perl -w use strict; use warnings; use Date::Calc qw(:all); my $month=(localtime())[4]+1; my $year=(localtime())[5]; my $new_year=$year + 1900; my @last_wednesday = Nth_Weekday_of_Month_Year($new_year,$month,3,4); print @last_wednesday, "\n\n"; [/snip code] In the definition of @last_wednesday, if I change ($new_year, $month, 3, 4) to ($new_year, $month, 3, 5), it could return nothing. I'm not sure how to test that. Suggestions? Thanks! -X