5 ms·
That's because hours are announced as points in time, while days are seen as time intervals. The duality intervals/separators is essential to the different ways
by TuringTest 6y ago
That's because hours are announced as points in time, while days are seen as time intervals. The duality
intervals/separators is essential to the different ways to understand ranges (specially for range differences).
I once developed a shortcut notation to simplify reasoning about ranges differentiating between "point cero" and "interval between 0 to 1", to make off-by-one errors less likely, but in the end it was functionally equivalent to the popular open/closed interval notations.
- TuringTest 6y agoIf anyone is interested in a notation for this kind of integer ranges, the two different styles in the above example could be represented like this: /9..10\ : "short" interval : size 1 (hour) == half-open interval [9..10) -|20..21|- : "long" interval : size 2 (days) == closed interval [20..21]