It therefore looks as though one nanosecond is going missing somewhere.
Is this intentional -- am I missing something to do with DateTime::Duration objects, or is this down to a bug in one of the DateTime modules?
I inserted this near the failing test
and it produceduse DDS; diag Dump( $span->duration, $duration );
So it apperas that DateTime::Duration->compare is not normalizing the units so the comparison fails. I consider this a bug.# $DateTime_Duration1 = { # days => 0, # end_of_month # => 'wrap', # minutes => 0, # months => 0, # nanoseconds # => 0, # seconds => 3600 # }; # $DateTime_Duration2 = { # days => 0, # end_of_month # => 'wrap', # minutes => 60, # months => 0, # nanoseconds # => 0, # seconds => 0 # }; # bless( $DateTime_Duration1, 'DateTime::Duration' ); # bless( $DateTime_Duration2, 'DateTime::Duration' );
In reply to Re: DateTime::Span intersection inconsistencies
by Anonymous Monk
in thread DateTime::Span intersection inconsistencies
by mikeman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |