Hi Andreas, 

It does need to be documented, but to explain:
$dt->compare follows the behavior of `cmp` and ``. 

- Rick 

On Thu, 10
Oct 2013 10:07:02 +0200, Andreas Isberg wrote: 

> Hi, 
> The
documentation does not specify what What does
DateTime::Duration->compare() returns. 
> From some testing I've done it
seems like it 
> 
> * 1 if the first duration is larger than the second,

> * 0 if the durations are equal 
> * -1 is the second duration is
larger than the first
> 
> Can anyone confirm this, and possibly update
the documentation? 
> Documentation is found here:
http://search.cpan.org/~drolsky/DateTime-1.03/lib/DateTime/Duration.pm#DateTime::Duration->compare(_$duration1,_$duration2,_$base_datetime_)
[1] 
> Kind regards, 
> Andreas Isberg
> 
> Telefon: 072-588 91 95 
>

> Message protected for iSite by MailGuard: e-mail anti-virus,
anti-spam and content filtering.
> http://www.mailguard.com.au [2] 
>
Report this message as spam [3]

  

Links:
------
[1]
http://search.cpan.org/~drolsky/DateTime-1.03/lib/DateTime/Duration.pm#DateTime::Duration->compare(_$duration1,_$duration2,_$base_datetime_)
[2]
http://www.mailguard.com.au/rm
[3]
https://login.mailguard.com.au/report/1I9kqknXTc/2eG4yrlviF9PLZ81IBzAU4/0.002
-- 
Message  protected for iSite by MailGuard: e-mail anti-virus, anti-spam and 
content filtering.http://www.mailguard.com.au

Reply via email to