Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DateTime CPAN distribution.

Report information
The Basics
Id: 115781
Status: resolved
Priority: 0/
Queue: DateTime

People
Owner: Nobody in particular
Requestors: lautgesetz [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.33
Fixed in: (no value)



Subject: delta_ms behavior inconsistent with docs
The docs for delta_ms state, "Returns a duration which contains only minutes and seconds. Any day and month differences to minutes are converted to minutes and seconds." However, the code reads: $p{hours} = $dur->hours + ( $days * 24 ); $p{minutes} = $dur->minutes; $p{seconds} = $dur->seconds; Either the docs or the code should be modified to account for the hours. As of right now, the docs would lead one to believe that the hours will be incorporated into the minutes, but that is not the case. I don't know whether the docs or the code describe the intended behavior.
Hours and minutes are interchangeable in a duration. This is not a bug. Use the DateTime::Duration->in_units method if you just want minutes.