Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: A date calculation

by crawfordr (Acolyte)
on Dec 18, 2007 at 22:10 UTC ( [id://657754]=note: print w/replies, xml ) Need Help??


in reply to Re: A date calculation
in thread A date calculation

Hello, Thanks for the response. I have a question, how do we get 13 * 24 * 60 * 60 from 1123200. I was not sure how that was done. Thanks.

Replies are listed 'Best First'.
Re^3: A date calculation
by jrsimmon (Hermit) on Dec 18, 2007 at 22:30 UTC
    13*24*60*60 is (days * hours/day * minutes/hour * seconds/min). So your script is taking the current date/time, adding 13 days to it, and then printing the two digit month and year of that date/time. Since 13 days from now is still December 2007, you're getting 0712 (instead of the 0801 you evidently expected).
Re^3: A date calculation
by vlademonkey (Pilgrim) on Dec 18, 2007 at 22:32 UTC
    time is in seconds, so he is just converting 1123200 seconds into days
    11123200 / 60 sec / 60 min / 24 hours = 13 days.
    Or 13 days * 24 hours * 60 min * 60 sec = 1123200 seconds.
Re^3: A date calculation
by FunkyMonk (Chancellor) on Dec 18, 2007 at 22:33 UTC
    13 days * 24 hours * 60 minutes * 60 seconds = 1123200 seconds

    Now I know I'm missing something:(

      No. One takes 13 days and multiplies it by unity three times, leaving it unchanged. Here is how it goes:
      (13 d) (24 h/d) (60 m/h) (60 s/m) = 1123200 s

Log In?
Username:
Password:

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

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

    No recent polls found