Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Gettting the last Friday of every month using Time::Piece

by LanX (Cardinal)
on Jun 30, 2014 at 15:57 UTC ( #1091745=note: print w/replies, xml ) Need Help??


in reply to Gettting the last Friday of every month using Time::Piece

> 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)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1091745]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2021-04-13 09:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?