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: 77066
Status: resolved
Priority: 0/
Queue: DateTime

People
Owner: Nobody in particular
Requestors: BBYRD [...] cpan.org
Cc:
AdminCc:

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



Subject: delta_ms also captures hours; not reflected in docs
According to the docs, delta_ms only gives out the minutes and seconds of a DT delta. This isn't true, as the code is clearly passing an hours key/value. This should be fixed in the docs to reflect that it also gives the hours.
Subject: Re: [rt.cpan.org #77066] delta_ms also captures hours; not reflected in docs
Date: Tue, 8 May 2012 11:08:52 -0500 (CDT)
To: Brendan Byrd via RT <bug-DateTime [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Tue, 8 May 2012, Brendan Byrd via RT wrote: Show quoted text
> According to the docs, delta_ms only gives out the minutes and seconds > of a DT delta. This isn't true, as the code is clearly passing an hours > key/value. This should be fixed in the docs to reflect that it also > gives the hours.
Hours are simply a count of minutes/60. In the same way, delta_days also can give you weeks. I'm not sure how to phrase this in the docs. The duration api can be a bit confusing, I understand. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/
Oh, sorry, I was looking at the delta_ms code and saw the hours, but didn't go further into the DateTime::Duration new method, where it further converts the hours into minutes.