go ahead... be a heretic | |
PerlMonks |
Re: Gettting the last Friday of every month using Time::Pieceby LanX (Saint) |
on Jun 30, 2014 at 15:57 UTC ( [id://1091745]=note: print w/replies, xml ) | Need Help?? |
> Any suggestions? Take $n=$lastday->day_of_week of the last day of the month (according to Time::Piece 0=Sunday) Then subtract $diff days from $lastday to get day_of_week 5 = Friday. Ie. $diff = ($n-5) % 7
Cheers Rolf (addicted to the Perl Programming Language)
In Section
Seekers of Perl Wisdom
|
|