Skip Menu |

This queue is for tickets about the Date-Manip CPAN distribution.

Report information
The Basics
Id: 41095
Status: resolved
Priority: 0/
Queue: Date-Manip

People
Owner: Nobody in particular
Requestors: codejumper [...] yahoo.com
Cc:
AdminCc:

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



Subject: Date::Manip::Delta_Format with "%yt" format uses only years field value (not weeks and others)
Date::Manip::Delta_Format with "%yt" format uses only years field value (not weeks and others). Following code shows this bug: use Date::Manip; my $d1 = Date::Manip::ParseDate('2005-10-10'); my $d2 = Date::Manip::ParseDate('2008-10-10'); # +0:0:156:4:0:0:0 my $years = Date::Manip::Delta_Format(Date::Manip::DateCalc($d1, $d2), undef, "%yt"); printf("year diff: %s (returned %.02f)\n", (int($years)==3 ? "ok" : "ERROR", $years)); With Date::Manip v5.42 we got: year diff: ok (returned 3.00) But with Date::Manip v5.54 we got: year diff: ERROR (returned 0.00)
In the 6.xx releases, this works correctly if you add the 'approx' mode argument. Tested in 6.30 (but probably works in earlier versions as well).