Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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

by LanX (Saint)
on Jun 30, 2014 at 15:57 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1091745]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-24 05:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found