XP is just a number | |
PerlMonks |
Re: Date Operationsby mojotoad (Monsignor) |
on Jul 02, 2002 at 03:26 UTC ( [id://178762]=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|