Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: cpan [...] zoffix.com
Cc:
AdminCc:

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



Subject: Existing Code Breaks
Just updated my system, and a lot of my old code no longer works. Never had time to figure out if this is The Way to do what I wanted, but this is the code I used: Delta_Format(DateCalc("September 21, 2011", "now"), 0, "%dt"); It worked fine, but now it returns "0". To fix the code, one needs to add the $mode argument: Delta_Format(DateCalc("September 21, 2011", "now"), "approx", 0, "%dt"); Cheers, ZZ
That's a backward incompatibility that I hadn't noticed... however, the results are correct (i.e. the new behavior is the correct behavior given the recent changes to deltas). As of version 6.30, deltas underwent some pretty significant changes to allow much better deltas and calculations. As a result, exact deltas no longer have day values, and so the result of "0" that you report is correct. I need to add support for this in to the functional interface (which is what you're using). In the OO interface, you have a lot better control currently, but I should certainly add support for the new types of deltas in the functional interface.