Files
Nim/tests/stdlib
Jonathan Bernard 68d3486f5a Bugfix for times.initInterval (issue #4889)
`initInterval` had logic to calculate and carry overflowed fields (65 seconds
turns into 5 seconds and carries 1 minute). However, we were not including that
carried value when we recalculate the carry over for the next period of time.So
if you had, for example, 3600 seconds, we carried 60 minutes into the minutes
calculation, but when we calculated how much we should carry into the hours
value we only considered what the user originally supplied for the minutes
field, and forgot to include those 60 carried minute.

So, for example, with the previous implementation this was true:

`seconds(60 * 60 * 24) == seconds(0)`

Or, as failing tests:

```nimrod
import times

assert seconds(60 * 60 * 24) != seconds(0)
assert seconds(60 * 60 * 24) == days(1)
```
2016-10-12 15:44:21 -05:00
..
2016-07-29 23:51:01 +02:00
2015-03-12 11:08:03 +01:00
2014-01-13 02:10:03 +01:00
2014-08-29 09:12:12 +02:00
2014-07-19 14:37:47 +02:00
2015-03-10 15:34:15 +01:00
2014-01-13 02:10:03 +01:00
2015-06-20 11:37:29 +01:00
2015-08-03 12:35:57 -04:00
2015-08-03 12:35:57 -04:00
2015-08-03 12:35:57 -04:00
2015-03-31 00:32:39 +02:00
2015-05-26 19:14:04 -04:00
2016-05-02 16:59:38 +08:00
2016-01-15 14:44:54 +01:00
2016-07-01 07:24:30 -06:00
2015-09-27 15:49:40 +10:00
2014-01-13 02:10:03 +01:00
2014-08-29 09:12:12 +02:00
2016-07-22 22:31:09 +02:00
2015-08-21 21:40:24 +02:00
2014-08-29 09:12:12 +02:00
2014-08-29 09:12:12 +02:00