laziness, impatience, and hubris | |
PerlMonks |
Re^2: Getting previous dates from the current dateby Smylers (Pilgrim) |
on Mar 29, 2005 at 17:32 UTC ( [id://443201]=note: print w/replies, xml ) | Need Help?? |
This should work But it won't do all the time: you've fallen for the apparently common trap of assuming that days have 24 hours in them, then using localtime. More generally, you've fallen for the trap of trying to write this stuff yourself rather than trusting the DateTime geniouses to have got it right for you, so that you don't need to think about such awkwardnesses. Smylers
In Section
Seekers of Perl Wisdom
|
|