Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Date Operations

by mojotoad (Monsignor)
on Jul 02, 2002 at 03:26 UTC ( [id://178762]=note: print w/replies, xml ) Need Help??


in reply to Date Operations

I was going to suggest that you need not bother with any of the date modules for such a "simple" calculation -- you could merely add $days*60*60*24 to the seconds since epoch followed by a reverse transformation.

However, in 2002, DST reverts on October 27th, so such a calculation would fail by coming up one hour short.

It is precisely due to such gotchas that the date modules come in handy. I've had good results with Date::Calc (fast but requires a C compiler), Date::Manip (slower, possibly more complete for esoteric dates, no C), and Time::Piece (C compiler).

Matt

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-25 17:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found