Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

djberg96 (2603)

  (email not shown publicly)

Journal of djberg96 (2603)

Wednesday March 06, 2002
07:35 PM

Date::Calc woes

[ #3337 ]
I'm using the Date::Calc::Object module in a script and I came across what I consider to be a bug. If you have two date objects and add them together, it doesn't recalculate each piece of time.

In other words, if you have 1 minute, 32 seconds (as an object) and add 45 seconds (again, as an object), you end up with 1 min, 77 seconds instead of 2 minutes, 17 seconds.

I've emailed the author. No response yet. We'll see if this is "normal" behavior or not. I'm a bit surprised at this, given how long this module has been around, though I think the OO is new.

This seems to be my forte' - finding bugs in other people's code.

UPDATE 7-Mar-2002

Steffen has informed me that Date::Calc doesn't do automatic normalization, even for objects, but it can be done using some other methods. I have proposed a 'normalize()' method in response.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.