From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#43677: 27.1; Calc holidays off-by-one error, incorrect business day calculation Date: Wed, 30 Sep 2020 10:55:10 +0200 Message-ID: References: <87sgb07zbi.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32456"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Aaron Zeng , 43677@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 30 10:56:26 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNXuR-0008I3-Kp for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 30 Sep 2020 10:56:23 +0200 Original-Received: from localhost ([::1]:43794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNXuQ-0000pb-KA for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 30 Sep 2020 04:56:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55276) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNXu6-0000pQ-4m for bug-gnu-emacs@gnu.org; Wed, 30 Sep 2020 04:56:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46586) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kNXu5-0000Zz-Re for bug-gnu-emacs@gnu.org; Wed, 30 Sep 2020 04:56:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kNXu5-0005WK-Qu for bug-gnu-emacs@gnu.org; Wed, 30 Sep 2020 04:56:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Sep 2020 08:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43677 X-GNU-PR-Package: emacs Original-Received: via spool by 43677-submit@debbugs.gnu.org id=B43677.160145612021173 (code B ref 43677); Wed, 30 Sep 2020 08:56:01 +0000 Original-Received: (at 43677) by debbugs.gnu.org; 30 Sep 2020 08:55:20 +0000 Original-Received: from localhost ([127.0.0.1]:58132 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNXtQ-0005VR-9g for submit@debbugs.gnu.org; Wed, 30 Sep 2020 04:55:20 -0400 Original-Received: from mail-wr1-f49.google.com ([209.85.221.49]:46753) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNXtO-0005VD-PQ for 43677@debbugs.gnu.org; Wed, 30 Sep 2020 04:55:19 -0400 Original-Received: by mail-wr1-f49.google.com with SMTP id o5so834118wrn.13 for <43677@debbugs.gnu.org>; Wed, 30 Sep 2020 01:55:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version; bh=HaN4JfhWGMqdhvK91UCg/Ha5azEMgVWDoXLikfnoAwA=; b=YAA6DGAokvzj8PE27P+JTVZTgq5YmjTbANpk6LpIBlmVHXs0+BnI5hRnrl924hWg78 jZfe0De1wcu5UXq1Twog+DNZwuXduL67T/kWKwraoIvZ5VmoYkwx7H0bW5cHdGNNrHMZ yMbZ8Q5T/3/H7LQ4UVEKU3/R/+s1n4RLX4OmZE1kqTuRkVO8YGf0v1bLpGbp0hJHcKC/ WWk7UMKqzk2+0n/atZn0US7W9Zyglqsu27eMWNwDdix/77QEx3fN4D2B/CkYRsJKYPQD W9Q1VeNccseiYBXXk9RrGzV16TPzWIzFXK4IQObujDpW00QNTlMAD8+kZ4PQ3Yru8svR ZfJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version; bh=HaN4JfhWGMqdhvK91UCg/Ha5azEMgVWDoXLikfnoAwA=; b=shpNF1vCS6Ub3NRLvlkx7BvIgA+t4oaqnvPFfvTOm+4nXuCrL21gVcCKGjtCm7Dan5 HyKzJTi9NmYZzuefIm5fMLwL7tl8H33C2VK8eqrfcvKnF0klstwh9PZNKDHxw0KVD77x BXt2lgLYiHW21HIkTZDwLyOD/5wfsXZrwCrb/Z8co9wojGt4e3vJzXZN6z3sQDAF/9/f d3jBm26U5ah655x7UsF/m+Jev2mXcRYgZIWc2Ik4rY3eXYJiCztpP/fOsp+Vk9D11FR/ M297Yn7V6zXnM1ZlRheTFk5G5+8URUvBfpD+GZp8qUEzzi12C2UQdxq8VTrhYfPfLSYd bYAw== X-Gm-Message-State: AOAM532Wf2ibpsRjbkPxVizxwX/GyUzFj91oWX+DpeNvpGoWq0e8blgB 8Ig54JRXTsXlPh1kBRE6zHyVttap/WY6Ww== X-Google-Smtp-Source: ABdhPJxK55vG0mt8D1m6NehlVGP+9+sN9Iy0YFVF9rDm4VbQJkTSfAilbdXslVbu9nBervIBh4qbVA== X-Received: by 2002:a5d:6691:: with SMTP id l17mr1996572wru.10.1601456112363; Wed, 30 Sep 2020 01:55:12 -0700 (PDT) Original-Received: from rpluim-mac ([2a01:e34:ecfc:a860:215c:b811:c438:6af7]) by smtp.gmail.com with ESMTPSA id t5sm1740591wrb.21.2020.09.30.01.55.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Sep 2020 01:55:11 -0700 (PDT) In-Reply-To: <87sgb07zbi.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 30 Sep 2020 04:50:25 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:189320 Archived-At: >>>>> On Wed, 30 Sep 2020 04:50:25 +0200, Lars Ingebrigtsen said: Lars> Indeed -- applying the following patch (which numbers Monday as 0 and Lars> Sunday as 6) makes the test case work correctly for me. But trying to Lars> follow the code makes it unclear... er... what's going on, and there Lars> aren't many comments in the Calc code to explain what they were Lars> thinking. Lars> I wondered whether this might be a US/non-US thing (with a difference in Lars> what day starts the week), but I couldn't really find anything in calc Lars> talking about that... Lars> Does anybody have any insight here? Sunday is the first day of the week in the US and in France (and others, probably). Monday is the first *business* day of the week, which I think is what's important here. Robert --