[Bug 29496] New: [FO31] parse-ietf-date with military timezones and leniency towards single-digit numbers

https://www.w3.org/Bugs/Public/show_bug.cgi?id=29496

            Bug ID: 29496
           Summary: [FO31] parse-ietf-date with military timezones and
                    leniency towards single-digit numbers
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Functions and Operators 3.1
          Assignee: mike@saxonica.com
          Reporter: abel.braaksma@xs4all.nl
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

If I understand the text in the internal draft and CR correctly, the function
fn:parse-ietf-date is meant to parse a date that is approximate to RFC-822,
RFC-1123, RFC-850, RFC-1036, POSIX actime. It is more liberal than the more
restrictive grammar in RFC-2616.

I have a few observations:

1) I am missing the military timezones allowed by RFC-822. Since
format-dateTime can create them, it seems to make sense to allow them as input
as well.

2) In a similar vain, with the note on "be liberal in what to accept" it seems
to make sense to allow unmentioned timezones with an implementation-defined
offset. Currently that is an error (but this may well be intentional).

3) The text explains for each absent token or partial token what the default
is, but not for fractional seconds. Obviously this must be zero and perhaps it
is a bit too pedantic to add it, but nevertheless, all the other optional parts
of the grammar have such a mention.

4) The Note on leniency towards single-digit vs double-digit numeric values
says "Accepts a single-digit value in place of a two-digit value with a leading
zero". This appears to imply "in a place where two digits can be replaced by a
single digit then...". But the grammar only allows this for the daynum, not for
hours. Is "3:45" to be treated as an error or may it be parsed as "03:45"? If
the latter was the intend of this Note, I think the grammar should reflect
that, or the Note could perhaps give it as example (or conversely, mention
specifically that *only* daynum can be treated this way).

5) Perhaps the 4th paragraph of the Note could be written as follows to reflect
point (4) above or more generally, remove the confusion that the grammar should
not be taken too strictly (which I doubt is the intend):

Suggestion to replace: "Reflecting the internet tradition of being liberal in
what is accepted, the function also:"

with: "Reflecting the internet tradition of being liberal in what is accepted,
the grammar of the function deliberately accepts:"

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Sunday, 21 February 2016 18:39:12 UTC