unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattiase@acm.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Aaron Zeng <zeng.aaron.l@gmail.com>, 43677@debbugs.gnu.org
Subject: bug#43677: 27.1; Calc holidays off-by-one error, incorrect business day calculation
Date: Wed, 30 Sep 2020 18:12:43 +0200	[thread overview]
Message-ID: <FF350895-A8C5-48D3-A102-D1A541944647@acm.org> (raw)
In-Reply-To: <87blhn757u.fsf@gnus.org>

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.






  parent reply	other threads:[~2020-09-30 16:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-28  1:18 bug#43677: 27.1; Calc holidays off-by-one error, incorrect business day calculation Aaron Zeng
2020-09-30  2:50 ` Lars Ingebrigtsen
2020-09-30  8:55   ` Robert Pluim
2020-09-30  9:42 ` Mattias Engdegård
2020-09-30 13:40   ` Lars Ingebrigtsen
2020-09-30 15:52     ` Glenn Morris
2020-09-30 16:22       ` Lars Ingebrigtsen
2020-09-30 16:31         ` Andreas Schwab
2020-09-30 16:12     ` Mattias Engdegård [this message]
2020-09-30 16:23       ` Lars Ingebrigtsen
2020-10-01 10:19       ` Mattias Engdegård
2020-10-01 22:47         ` Aaron Zeng
2020-10-02 10:00           ` Mattias Engdegård

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=FF350895-A8C5-48D3-A102-D1A541944647@acm.org \
    --to=mattiase@acm.org \
    --cc=43677@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=zeng.aaron.l@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).