[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Omaha.pm] DateTime::Duration ->days()
On Jan 14, 2011, at 9:03 PM, Jay Hannah wrote:
> What the heck? Why is DateTime so popular? Date::Calc and Class::Date make this trivial.
See? Easy...
$ cat j2.pl
use 5.12.0;
use Date::Calc qw(Delta_Days);
say sprintf('$%0.2f', 1025 / Delta_Days(2007, 5, 15, 2011, 1, 14));
$ perl j2.pl
$0.76
My laptop died today. And that's how much money it cost me per day I owned it. Used it daily. Not bad. :)
http://www.facebook.com/photo.php?pid=1500762&l=fe015d08cb&id=1032415362
Thanks,
Jay Hannah
Software Architect
jhannah@mutationgrid.com | http://mutationgrid.com | 1-402-598-7782