bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] ISO 8601 basic format and decimal hours, minutes


From: Assaf Gordon
Subject: Re: [PATCH] ISO 8601 basic format and decimal hours, minutes
Date: Sun, 7 Apr 2019 01:20:41 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

Hello Alex,

Thank for you putting the time for writing the patch
and descriptions in such details.

In general:

On 2019-02-18 9:00 p.m., Alex Eulenberg wrote:
1. Accept dates in the ISO 8601 basic date and time format.
[...]> 2. Accept decimal fractions of time units other than seconds in
accordance with ISO 8601.
[...]
Forms no longer accepted as a result of the patch:
[...]
input                  current output              output with patch
"20180102 00-03"       2018-01-02T03:00+00 +       (rejected)
"20180102 04-03"       2018-01-02T07:00+00 +       (rejected)
[...]

input                  current output              output with patch
"20180102T00-03"       (rejected)                  2018-01-02T03:00+00
"20180102T04-03"       (rejected)                  2018-01-02T07:00+00

Adding new accepted formats is good,
but rejecting (or changing the meaning of) currently-accepted formats
is a much more problematic decision due to breaking existing programs.

I think that before continuing, it should be discussed and decided
whether this is acceptable or not (Paul, Jim?).

If we do go forward this this breaking-change, we should make sure
to announce it and communicate it properly to users of coreutils' date(1).

As a compromise, note that the 'parse_datetime2' function accepts
'flags' parameter (added in recent years). Perhaps a flag could
be specified if 'T' is always iso8601 or military time
(and then add an option to date(1) ).


2. For inputs of form "(YY)YYMMDD'T'hhmm" the current version of
parse-datetime interprets the "T" as the single-letter military time zone
identifier equivalent to zone offset +0700. This is probably never the
intention.

Not so, 'T' has special handling code, and in some of the cases
is explicitly translated to HOUR(7):
https://git.savannah.gnu.org/cgit/gnulib.git/tree/lib/parse-datetime.y#n751


  doc/parse-datetime.texi     |  17 ++--
  lib/parse-datetime.y        | 193 ++++++++++++++++++++++++++++++------
  tests/test-parse-datetime.c | 115 +++++++++++++++++++++
  3 files changed, 291 insertions(+), 34 deletions(-)

As your contribution is significant (more than 10 lines),
a copyright assignment is required before we can review the patch (see https://www.gnu.org/licenses/why-assign.html ).

Please complete the following short form and send it to address@hidden:

https://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/Copyright/request-assign.future

regards,
 - assaf









reply via email to

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