From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Zefram Newsgroups: gmane.lisp.guile.bugs Subject: bug#26149: SRFI-19 doc erroneously warns about Gregorian reform Date: Fri, 17 Mar 2017 23:53:07 +0000 Message-ID: <20170317235307.GF6518@fysh.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1489794850 15427 195.159.176.226 (17 Mar 2017 23:54:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 17 Mar 2017 23:54:10 +0000 (UTC) To: 26149@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sat Mar 18 00:54:06 2017 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cp1h7-0003Ws-9A for guile-bugs@m.gmane.org; Sat, 18 Mar 2017 00:54:05 +0100 Original-Received: from localhost ([::1]:51318 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cp1hD-0002q3-B1 for guile-bugs@m.gmane.org; Fri, 17 Mar 2017 19:54:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cp1h7-0002pw-6i for bug-guile@gnu.org; Fri, 17 Mar 2017 19:54:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cp1h4-0000QZ-6B for bug-guile@gnu.org; Fri, 17 Mar 2017 19:54:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34850) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cp1h4-0000QT-2G for bug-guile@gnu.org; Fri, 17 Mar 2017 19:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cp1h3-0005vy-Sl for bug-guile@gnu.org; Fri, 17 Mar 2017 19:54:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Zefram Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 17 Mar 2017 23:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 26149 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.148979481022768 (code B ref -1); Fri, 17 Mar 2017 23:54:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Mar 2017 23:53:30 +0000 Original-Received: from localhost ([127.0.0.1]:33049 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cp1gW-0005v8-Tm for submit@debbugs.gnu.org; Fri, 17 Mar 2017 19:53:30 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54215) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cp1gV-0005uu-4C for submit@debbugs.gnu.org; Fri, 17 Mar 2017 19:53:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cp1gO-00007m-Ed for submit@debbugs.gnu.org; Fri, 17 Mar 2017 19:53:21 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:58752) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cp1gO-00007d-BL for submit@debbugs.gnu.org; Fri, 17 Mar 2017 19:53:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45182) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cp1gM-0002la-Vb for bug-guile@gnu.org; Fri, 17 Mar 2017 19:53:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cp1gJ-0008VT-U6 for bug-guile@gnu.org; Fri, 17 Mar 2017 19:53:19 -0400 Original-Received: from river.fysh.org ([87.98.248.19]:45787) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cp1gJ-0008Ty-Jt for bug-guile@gnu.org; Fri, 17 Mar 2017 19:53:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=fysh.org; s=20170316; h=Content-Type:MIME-Version:Message-ID:Subject:To:From:Date; bh=RVu3Ynndk7pGfHIJNHUI3nlvSH7Ua1/q3rL/B0uRiYc=; b=lbuIrdUO/F9XsgPlAcA1N1iNluVgqKtDNEGhbYbBg77JAbtyrhTVzxUm4nghiRtz2XdwJldStPyXbDFbZV43ci0oU3pTWRIMANj4dyWl0K2rH5qNbxrl1ILw64HZAO4pW3VXOzaRXVmeI4nzdmz8eOC6UiyUDrk9rJHf1pOyhGM=; Original-Received: from zefram by river.fysh.org with local (Exim 4.84_2 #1 (Debian)) id 1cp1gB-0002mQ-OO; Fri, 17 Mar 2017 23:53:07 +0000 Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:8700 Archived-At: The documentation, near the start of the section on SRFI-19, says ! *Caution*: The current code in this module incorrectly extends the ! Gregorian calendar leap year rule back prior to the introduction of ! those reforms in 1582 (or the appropriate year in various countries). ! The Julian calendar was used prior to 1582, and there were 10 days ! skipped for the reform, but the code doesn't implement that. ! ! This will be fixed some time. Until then calculations for 1583 ! onwards are correct, but prior to that any day/month/year and day of the ! week calculations are wrong. The statements that the code is incorrect in this behaviour are erroneous. SRFI-19 itself says # A Date object, which is distinct from all existing types, represents a # point in time as represented by the Gregorian calendar as well as by a # time zone. The code is thus correct in always using the Gregorian calendar in date structures. Per ISO 8601 it is also correct in always using the Gregorian calendar in string output in that standard's formats. SRFI-19 isn't explicit about the calendar used as the basis for the other string output formats, but since the formatting proceeds from a date structure it seems implied that they should use the same basis as the date structure. For string input it is explicit that the parseable numeric formats correspond directly to fields of the date structure. There is no part of SRFI-19 that looks like it is ever intended to use the Julian calendar. So the code should not be `fixed', and the statements about that and about incorrectness should be removed from the documentation. It is sensible to keep an explicit statement about the treatment of the Gregorian reform, but the decision to use the Gregorian calendar proleptically should be credited to SRFI-19 (the standard), not to the code. -zefram