Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: epoch time

by spatterson (Pilgrim)
on Jan 31, 2007 at 15:22 UTC ( [id://597548]=note: print w/replies, xml ) Need Help??


in reply to epoch time

Why can't you use those modules? There's also Date::Calc and Date::PCalc, doing this by hand would be ... painful, but you could have a hash of month lengths keyed by name, then subtract 1970 from the year and total up the days in each month before this one.

If there is no code here, it is for your enlightenment

Replies are listed 'Best First'.
Re^2: epoch time
by ikegami (Patriarch) on Jan 31, 2007 at 16:25 UTC
    Don't forget leap years...
      and that (among other things) is why its wiser to use established modules when you can.

      just another cpan module author

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-04-16 06:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found