[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#43677: 27.1; Calc holidays off-by-one error, incorrect business day
From: |
Mattias Engdegård |
Subject: |
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@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.
- bug#43677: 27.1; Calc holidays off-by-one error, incorrect business day calculation, Aaron Zeng, 2020/09/28
- bug#43677: 27.1; Calc holidays off-by-one error, incorrect business day calculation, Lars Ingebrigtsen, 2020/09/29
- bug#43677: 27.1; Calc holidays off-by-one error, incorrect business day calculation, Mattias Engdegård, 2020/09/30
- bug#43677: 27.1; Calc holidays off-by-one error, incorrect business day calculation,
Mattias Engdegård <=
- bug#43677: 27.1; Calc holidays off-by-one error, incorrect business day calculation, Lars Ingebrigtsen, 2020/09/30