On Sat, 28 Jun 2003, Rick Measham wrote:

> This is just for comment. As per my previous email, this module allows
> one to compare durations when given a reference point. I'm not real
> happy with the method names, and I've just called it
> DateTime::Duration::Compare for the time being.
> DateTime::Utils::CompareDurations may be better. Or something else.
>
> This module isn't an 'overload' module because a comparison here needs
> three parameters: A datetime and two durations.
>
> It's not fussy about what kind of calendar you're using either, just so
> long as it has utc_rd_values. The durations currently have to be
> DateTime::Duration objects. As the docs say, once there's an equivilent
> for durations (rd_values maybe) then we can easily put them in.
>
> The module is regular vanila procedural rather than object oriented.
> There's no need for objects unless someone thinks a comparitor object
> should be made from a datetime! ($dtc->gt($duration1, $duration2))
>
> Anyways, as the subject says, this is just a request for comments. If I
> hear back that there's already a way to do this then I'll just shut up
> and slink off quietly!

If people want this, there's no reason I can't put it in the
DateTime::Duration module, or in the DateTime distro.  I just want to come
up with an API that's easy to use.  Being required to make a comparison
objects seems like it may be overkill.  It might just be easier to do:

  DateTime::Duration->compare_from( $dt, $dur1, $dur2 );


-dave

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

Reply via email to