Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Getting previous dates from the current date

by Smylers (Pilgrim)
on Mar 29, 2005 at 17:32 UTC ( [id://443201]=note: print w/replies, xml ) Need Help??


in reply to Re: Getting previous dates from the current date
in thread Getting previous dates from the current date

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

  • Comment on Re^2: Getting previous dates from the current date

Replies are listed 'Best First'.
Re^3: Getting previous dates from the current date
by tcf03 (Deacon) on Mar 29, 2005 at 18:23 UTC
    should being the operative word. Its worked to my advantage that just enough was good enough.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2024-04-25 18:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found