Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Getting previous dates from the current date

by Smylers (Pilgrim)
on Mar 29, 2005 at 17:32 UTC ( #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
Node Status?
node history
Node Type: note [id://443201]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2018-07-22 09:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (453 votes). Check out past polls.

    Notices?