Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: days between dates

by Ratazong (Monsignor)
on Mar 15, 2013 at 14:27 UTC ( #1023710=note: print w/replies, xml ) Need Help??


in reply to days between dates

Hi!

If you are doing date-calculations, I strongly recommend not to re-invent the wheel, but to use a standard module. I have very good experiences with Date::Calc, which provides a function called Delta_Days. And which is consistent on any platform.

use Date::Calc qw (Delta_Days); print Delta_Days (1904,1,1, 2013,3,5) + 1462 , "\n";

HTH, Rata

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1023710]
help
Chatterbox?
[davido]: then it reads from /etc/passwd to decide who my uid is.
[davido]: sorry, typed that before you asked me to disable proc
[davido]: but you stumped me; don't know how to disable proc.
[tye]: I don't know if you can just dismount, but I thought so.
[davido]: yeah, umount -f isn't powerful enough.
[tye]: probably something in the init subsystem that does the mounting that you could disable and reboot.
davido needs to close laptop to board flight home from yapc.
[davido]: I'll look into it in a few hours probably.
[davido]: when i do get to that point I think I'll do it in a vm snapshot just in case. :)
[oiskuu]: tye, you were right: loginuid/sessionid are part of task struct if compiled with AUDITSYSCALL. I have some doubts if you should actually depend on that feature.

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2017-06-23 20:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (555 votes). Check out past polls.