From f2ba3d174c3e6b65d5785d1e621ce702c4bc36e1 Mon Sep 17 00:00:00 2001 From: Oscar NihlgÄrd Date: Tue, 10 Oct 2017 15:47:12 +0200 Subject: Fix countLeapYears --- lib/pure/times.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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. -- cgit 1.4.1-2-gfad0 h'/> This repository contains the Nim compiler, Nim's stdlib, tools, and documentation. (mirror)ahoang <ahoang@tilde.institute>
summary refs log blame commit diff stats
path: root/tinyc/libtcc.h
blob: 96070e2995ff698f369bab3883786f92908e2352 (plain) (tree)