Re: datetime:diff() question

new topic     » goto parent     » topic index » view thread      » older message » newer message
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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu