From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.bugs Subject: bug#21904: date->string duff ISO 8601 format for non-4-digit years Date: Sat, 20 Oct 2018 18:41:05 -0400 Message-ID: <87h8hg2qda.fsf@netris.org> References: <20151113142229.GO13455@fysh.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1540075205 32615 195.159.176.226 (20 Oct 2018 22:40:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 20 Oct 2018 22:40:05 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: 21904@debbugs.gnu.org To: Zefram Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sun Oct 21 00:40:01 2018 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 1gDzua-0008NJ-Ki for guile-bugs@m.gmane.org; Sun, 21 Oct 2018 00:40:00 +0200 Original-Received: from localhost ([::1]:56803 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDzwh-0007KI-6N for guile-bugs@m.gmane.org; Sat, 20 Oct 2018 18:42:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDzwb-0007K9-WB for bug-guile@gnu.org; Sat, 20 Oct 2018 18:42:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gDzwY-0001XS-0E for bug-guile@gnu.org; Sat, 20 Oct 2018 18:42:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57565) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gDzwX-0001XM-RV for bug-guile@gnu.org; Sat, 20 Oct 2018 18:42:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gDzwX-0001uP-OE for bug-guile@gnu.org; Sat, 20 Oct 2018 18:42:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 20 Oct 2018 22:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21904 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 21904-submit@debbugs.gnu.org id=B21904.15400752867288 (code B ref 21904); Sat, 20 Oct 2018 22:42:01 +0000 Original-Received: (at 21904) by debbugs.gnu.org; 20 Oct 2018 22:41:26 +0000 Original-Received: from localhost ([127.0.0.1]:33590 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDzvx-0001tU-OA for submit@debbugs.gnu.org; Sat, 20 Oct 2018 18:41:25 -0400 Original-Received: from world.peace.net ([64.112.178.59]:36162) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDzvv-0001tE-Jh for 21904@debbugs.gnu.org; Sat, 20 Oct 2018 18:41:23 -0400 Original-Received: from mhw by world.peace.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gDzvp-0000KR-MP; Sat, 20 Oct 2018 18:41:17 -0400 In-Reply-To: <20151113142229.GO13455@fysh.org> (Zefram's message of "Fri, 13 Nov 2015 14:22:29 +0000") 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:9222 Archived-At: Zefram writes: > scheme@(guile-user)> (date->string (julian-day->date 1722000 0) "~1") > $4 = "2-07-29" > scheme@(guile-user)> (date->string (julian-day->date 1730000 0) "~1") > $5 = "24-06-23" > scheme@(guile-user)> (date->string (julian-day->date 2000000 0) "~1") > $6 = "763-09-18" This particular subset of bugs, for years 0-9999, was fixed in the upstream SRFI-19 reference implementation, and so I included the same fix in commit 5106377a3460e1e35daf14ea6edbe80426347155. That fix pads the year to have at least 4 characters with the requested padding character (0 by default). However, it does not handle adding the sign where mandated by ISO 8601. As with your related bug , I think this bug should be reported to upstream SRFI-19, and hopefully they will take it seriously. I'm reluctant to have Guile deviate from most (all?) other SRFI-19 implementations in this respect. There's also the issue that 'string->date' would need to be fixed to successfully parse the years as printed by 'date->string'. Would you like to report these issues to upstream SRFI-19? Regards, Mark