Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Finding End of Month's date

by gmpassos (Priest)
on Jan 05, 2005 at 23:09 UTC ( #419773=note: print w/replies, xml ) Need Help??

in reply to Finding End of Month's date

Take a look at Date::Object:
use Date::Object ; my $d = Date::Object->new_local(2005 , 1 , 5) ; my $d_end = $d->clone->set(undef,undef,31) ; ## set(YYYY , MM , DD) print "date: $d\n" ; print "date end: $d_end\n" ; if ( $d == $d_end ) { print "Date is the last day of month!\n" ; }
date: 2005-01-05 00:00:00 date end: 2005-01-31 00:00:00
Try to change the inputs for $d on new_local() to match the last day of the month. If you don't paste any argument it will get the actual time.

Graciliano M. P.
"Creativity is the expression of liberty".

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://419773]
[LanX]: Obelix might offer to find it again ...
[LanX]: not much to translate anyway since Goscinny died
[Eily]: https://en. wiki/List_of_Aster ix_characters some of the names were changed to include a new pun
[LanX]: sure some are even funnier now
[LanX]: some lost because they were not translated like Epidemais
[LanX]: some of the english names are funny too

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (14)
As of 2017-05-24 15:05 GMT
Find Nodes?
    Voting Booth?