Re: datetime:diff() question
- Posted by jessedavis Dec 09, 2017
- 1315 views
Ekhnat0n said...
If you were asked the difference between 3 and 8, what would be your answer?
Let me guess.... 5
If I am correct, you have DEDUCTED 3 from 8 as everybody would do.
The DIFFERENCE(a,b) = abs(a-b), hence:
Difference(8,5) = Difference(5,8) = 3; It is the distance on the number line between the two.
However,
(5-8) = -3 and (8-5) = 3; the algebraic sum.
Again, the semantics aside, the documentation and the result should agree.
Thanks for your comments.
regards,
jd