On Mon, 30 Jun 2003, Flavio S. Glock wrote:

> > Well, maybe.  Right now the constructor is really simple, which is good.
> > More functionality is nice, but so is simplicity.
>
> use DateTime;
> my $dt = DateTime->now;
> my $dur = sub { $_[0]->add( months => 3 )->subtract( hours => 3 ) };
> print $dur->($dt)->datetime;

Hehe, _you_ might think that's simple but most people don't think in terms
of code references, closures, etc.  I think they're great, but it's not
necessarily what I'd suggest for general usage.


-dave

/*=======================
House Absolute Consulting
www.houseabsolute.com
=======================*/

Reply via email to