GNU bug report logs - #43677
27.1; Calc holidays off-by-one error, incorrect business day calculation

Previous Next

Package: emacs;

Reported by: Aaron Zeng <zeng.aaron.l <at> gmail.com>

Date: Mon, 28 Sep 2020 16:12:03 UTC

Severity: normal

Found in version 27.1

Done: Mattias EngdegÄrd <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

Full log


Message #23 received at 43677 <at> debbugs.gnu.org (full text, mbox):

From: Mattias EngdegÄrd <mattiase <at> acm.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Aaron Zeng <zeng.aaron.l <at> gmail.com>, 43677 <at> debbugs.gnu.org
Subject: Re: bug#43677: 27.1; Calc holidays off-by-one error, incorrect
 business day calculation
Date: Wed, 30 Sep 2020 18:12:43 +0200
30 sep. 2020 kl. 15.40 skrev Lars Ingebrigtsen <larsi <at> gnus.org>:

> That's quite a stretch to be bisecting, though...

Bisecting is logarithmic so large stretches are seldom a problem. You can also bisect restricted to one path which reduces the number of versions dramatically. (Building old versions of Emacs, on the other hand -- that can be messy!)

But you don't have to! I found it. The error was introduced in the calendar changes between c9f618db441 and fd1f1603a4f, during which the internal date numbering changed: date Jan 1, 1 AD went from date 0 to 1. However, the business days code remained unchanged and thus started getting the weekdays wrong.

Of course there were no tests but that is excusable since this was 2012 and tests weren't invented back then.

I'll put together a patch a little later today or tomorrow.





This bug report was last modified 4 years and 236 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.