Dave Rolsky wrote: > > On Fri, 3 Oct 2003, Eugene van der Pijll wrote: > [...] > > Would this be easy to implement? > > It's not hard, just a little bit of math. I'm more concerned with the > API. I don't like the one you have up there, but I don't want to just > change the existing syntax either, maybe something like: > > $dt1->subtract_datetime( $dt2 ); # current behavior > > $dt1->subtract_datetime( datetime => $dt2, > units => [ qw( days minutes nanoseconds ) ] );
BTW, how about adding a simple formatter to DT::Duration, something like a stripped down DateTime::Format::ICal->format_duration ? - Flavio S. Glock
