The fact that durations have time units is not an implementation detail but a part of the interface. It’s nice for the code to track what the units are. You can check whether the magnitude is zero with iszero though:
That statement itself is correct. But, the following two statements are totally different:
Durations have time units.
The smallest duration is 1 millisecond.
You are saying 1. The current implementation appears to expose 2. If you change the internal implementation to include microseconds, what would the output of (t2 - t1) % Dates.Hour(1) be?
should include iszero() in the “Comparisons” section. . . . (I’m not at all familiar with github and am still struggling to set it up for my account, so it would take a lot of time, which I don’t currently have, for me to be able to create a pull request. Sorry.)
My original issue was probably documentation problem or perhaps cultural. When I asked a question about DateTime arithmetic here in this forum when I was a total newbie, some people recommended solutions which assumed that the minimal duration step is one millisecond, using the .value attribute, if I remember correctly.
In hindsight, they should have recommended dividing by Millisecond(1) instead of referring to .value. Then nothing would have depended on the implementation detail.