Tage = 91 (13 Weeks)
Result of durationToDays is 90...
What went wrong?
An interesting question ...
How can the Duration between two days lead to a non-integral number of days, measured in milliseconds?
Proof:
bug_farm.aia (16.0 KB)
In financial programming, we are warned against salami truncation of fractional pennies, where monetary crumbs are swept into a crooked programmer's account unnoticed.
So THAT's where all that lost time has been going!
The remainder of the division by ms per day is looking too round for this to be a floating point division error:
Thanks to everybody!
I will try the "ms example" (getDays)
I don't have a good answer for this problem yet.
The one hour difference suggests to me that this might have something to do with Daylight Savings Time .
It seems to have something to do with daylight saving time. If I set 1970 or 1972 as the year, the problems don't arise.
Yeah, I missed your post.