You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returns on different platforms different results. Having read how TimeDifference makes the calculations (dividing difference in seconds by an approximate length of a year / month / day / ... in seconds) I'm not surprised any more by the results, but for the sake of others tempted to make the same mistake I suggest being more explicit in the README concerning accuracy: TimeDifference is great for quick calculations where no accuracy is required (how long is it since I wrote my blog post?), but unsuitable for accurate computations (for how many days of using the service will I be billed?).
The text was updated successfully, but these errors were encountered:
Recently I was debugging code which relied on TimeDifference when computing difference in days between two
Date
s. It turned out that code likereturns on different platforms different results. Having read how TimeDifference makes the calculations (dividing difference in seconds by an approximate length of a year / month / day / ... in seconds) I'm not surprised any more by the results, but for the sake of others tempted to make the same mistake I suggest being more explicit in the README concerning accuracy: TimeDifference is great for quick calculations where no accuracy is required (how long is it since I wrote my blog post?), but unsuitable for accurate computations (for how many days of using the service will I be billed?).
The text was updated successfully, but these errors were encountered: