bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21904: date->string duff ISO 8601 format for non-4-digit years


From: Zefram
Subject: bug#21904: date->string duff ISO 8601 format for non-4-digit years
Date: Thu, 20 Apr 2017 01:04:37 +0100

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

Attachment: 0001-fix-SRFI-19-s-ISO-8601-year-syntax.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]