On Thu, 17 Jun 2004, Delian Krustev wrote: > On Thursday 17 June 2004 14:15, Rick Measham wrote: > > use DateTime::Format::Duration; > > > > (See the docs for more information. IIRC there's a format key in there for > > 'as days') > > Thanks, > > use warnings; > use strict; > > use DateTime; > use DateTime::Format::Duration; > > my $d = DateTime::Format::Duration->new(pattern => "\%d \%e \%j"); > my $d1 = DateTime->now(); > my $d2 = DateTime->now(); > $d2->add(months=>2); > my $dur = $d2->subtract($d1);
Ah, I see. This should be subtract_datetime. The subtract method expects a hash of parameters which can be passed to DateTime::Duration->new. -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/
