> 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?

This gets my vote.  It's not as 'cool' as the code-ref solution but it is the behavior 
I'd expect from user defined data types.

-J

--

Reply via email to