Re: difference in absolute days

[email protected] ("Alex Teslik")
Newsgroups perl.datetime
Message-ID <[email protected]>
On Mon, 15 Dec 2008 20:04:26 -0500, Perrin Harkins wrote
 
> my $d1 = DateTime->today;
> my $d2 = $d1->clone->subtract(years => 1);
> 
> my $dur = $d1->delta_days($d2);
> print $dur->in_units('days') . "\n";
> 

corrected above. I don't know why the days method didn't work.

HTH,
Alex
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.