GNU bug report logs -
#21904
date->string duff ISO 8601 format for non-4-digit years
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
A patch to fix this is attached. The ISO 8601 date formats were
implemented by using the ~Y formatter for the year portion, but SRFI-19
doesn't require ~Y to follow ISO 8601, so this raises the question of
whether ~Y should. It could be fixed by changing ~Y to conform to
ISO 8601, retaining the existing factoring of the formatters. Or a
separate internal formatting function could be instituted to do ISO
8601 year formatting, with ~1 et al using that and ~Y left unchanged.
I chose the former strategy, partly because the funny non-linear year
number doesn't seem a useful thing to support in date->string at all,
but more strongly because it's useful to have access to ISO 8601 year
formatting on its own. There isn't any other format specifier for that
job; it looks like SRFI-19 imagines that ~Y will fill that need.
-zefram
[0001-fix-SRFI-19-s-ISO-8601-year-syntax.patch (text/x-diff, attachment)]
This bug report was last modified 6 years and 238 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.