diff options
author | Dominik Picheta <dominikpicheta@googlemail.com> | 2017-10-16 15:40:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-16 15:40:29 +0100 |
commit | 955b48cf15ce41f8c47010db0064da8668ed02c0 (patch) | |
tree | 37dd2bd2c8ee18f961720ac42eb0276fd0b764bc /lib | |
parent | 54c805921a5a02806e4df4adb6fad4b8d33a448d (diff) | |
parent | f2ba3d174c3e6b65d5785d1e621ce702c4bc36e1 (diff) | |
download | Nim-955b48cf15ce41f8c47010db0064da8668ed02c0.tar.gz |
Merge pull request #6495 from GULPF/Fix-countLeapYears
Fix countLeapYears
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/times.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/times.nim b/lib/pure/times.nim index 96668c4f8..7dd428904 100644 --- a/lib/pure/times.nim +++ b/lib/pure/times.nim @@ -1025,7 +1025,7 @@ proc countLeapYears*(yearSpan: int): int = ## counts the number of leap years up to January 1st of a given year. ## Keep in mind that if specified year is a leap year, the leap day ## has not happened before January 1st of that year. - (((yearSpan - 1) / 4) - ((yearSpan - 1) / 100) + ((yearSpan - 1) / 400)).int + (yearSpan - 1) div 4 - (yearSpan - 1) div 100 + (yearSpan - 1) div 400 proc countDays*(yearSpan: int): int = ## Returns the number of days spanned by a given number of years. |