From: Mark H Weaver <mhw@netris.org>
To: Zefram <zefram@fysh.org>
Cc: 21904@debbugs.gnu.org
Subject: bug#21904: date->string duff ISO 8601 format for non-4-digit years
Date: Sat, 20 Oct 2018 18:41:05 -0400 [thread overview]
Message-ID: <87h8hg2qda.fsf@netris.org> (raw)
In-Reply-To: <20151113142229.GO13455@fysh.org> (Zefram's message of "Fri, 13 Nov 2015 14:22:29 +0000")
Zefram <zefram@fysh.org> 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 <https://bugs.gnu.org/21903>, 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
next prev parent reply other threads:[~2018-10-20 22:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-13 14:22 bug#21904: date->string duff ISO 8601 format for non-4-digit years Zefram
2017-04-20 0:04 ` Zefram
2017-04-20 0:07 ` Zefram
2018-10-20 22:41 ` Mark H Weaver [this message]
2018-10-21 0:34 ` Mark H Weaver
2018-10-21 3:53 ` Mark H Weaver
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/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h8hg2qda.fsf@netris.org \
--to=mhw@netris.org \
--cc=21904@debbugs.gnu.org \
--cc=zefram@fysh.org \
/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.
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).