Why not:

$dur1 = new DT::Dur( days => 2 );
$dur2 = new DT::Dur( months => 1 );
$dur3 = $dur1 - $dur2;
$dur3->add( days => 3 );

If you add $dur3 to a date, it would add 2 days and
subtract a month, then add 3 days again.

This is not too difficult to implement. 
Is it too confusing?

- Flavio S. Glock


On Mon, Jun 30, 2003 at 12:20:43PM -0500, Dave Rolsky
wrote:
> > 2) Having a way to construct this directly would
be nice being able
> > to make a duration that you can not directly
construct seems odd.
> 
> Well, maybe.  Right now the constructor is really
simple, which is good.
> More functionality is nice, but so is simplicity.



Reply via email to