Issues
Diff member function for dateDiff incompatible with ACF
Description
Details
Assignee
Pothys - MitrahSoftPothys - MitrahSoftReporter
Pete FreitagPete FreitagNew Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Sprint
NoneFix versions
Affects versions
Priority
Major
Details
Details
Assignee
Reporter
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Sprint
Fix versions
Affects versions
Priority
Activity
Pothys - MitrahSoft22 November 2021 at 09:48
I've checked this ticket on the lucee latest build 6.0.0.132-SNAPSHOT and now dateDiff(), date.diff() returns result same as ACF.
Michael Offner19 November 2021 at 15:44
please give that new build a try
Zac Spitzer9 May 2019 at 16:29
Can somebody with rights add the acf-compat label to this?
Michael Offner9 May 2019 at 15:31
not really sure we should follow ACF here, ACF seem to turn left and right around.
in addition fixing this will cause issues for existing code depending on the existing functionality, means if we change it we cannot do it before 6.0, we do no changse in minor release that change functionality of existing code.
Pothys - MitrahSoft23 October 2018 at 15:15
I've added test case & Confirmed the issue happened on lucee. I've fixed this issue. ACF returns as expected but lucee returns always positive result while using member function for calculating a differences between two different dates.
Pull request: https://github.com/lucee/Lucee/pull/595
The diff member function as implemented in lucee operates inversely to the ACF implementation, so the same code will produce a positive number on one engine and a negative number on the other.
Here is an example:
https://trycf.com/gist/df4796e9f5252d781b104ebb2da3f595/lucee5
https://trycf.com/gist/df4796e9f5252d781b104ebb2da3f595/acf2018
The code:
Outputs `1515` on lucee and `15-15` on ACF.