Closed ikr closed 6 years ago
Can you tell me your time zone not sure the problem is day light saving related but it might be. It does not look trivial to track down, so will have to allocate a few hours to look into properly in next few weeks.
I'm in Europe/Zurich
Thanks have tests locally, its not your time zone specifically.
I suspect you are not using Windows ;). Just found out elm still has the problem of parsing large integers correctly, due to its compiler and run time. I had to add ".0" to the 4 times you have in test to make them work for the dates you comment.
Note i am in Windows :).
Interestingly, the deltas are different in Ellie
https://ellie-app.com/79kkCgBXNa1/0
0 years 0 months 6 days 3 hours 0 years 0 months 16 days 3 hours
Ha! Right! If I add ".0" in Ellie, the deltas are the same as those I'm getting with elm-test in the terminal. I'm on Linux.
Yes the problem i have without making sure they are parsed as floats by elm in windows. Reading large integers does weird things - there is a bug raised against compiler way back I believe its tied up with Haskell compiler.
I had some inspiration and was awake anyway, I believe I have fixed the core problem. It was relatively simple even if I can't help but feel the diff code might be more succinct its quite wordy :). Published 9.2.3.
Hey, that's awesome! Thank you very much!
Case 1: 2019-01-01 — 2018-01-11T21:00:00
However,
Duration.diff
returns -1 month insteadCase 2: 2019-01-11 — 2018-01-11T21:00:00
However,
Duration.diff
returns -1 day instead