You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An RFC 1123 date can be generated approximately using fn:format-dateTime with a picture string of "[FNn3], [D01] [MNn3] [Y04] [H01]:[m01]:[s01] [Z0000]".
Given a dateTime like 1994-06-06T07:29:35Z, applying fn:format-dateTime with this picture string should return:
Mon, 06 Jun 1994 07:29:35 +0000
But according to the documentation on the picture string at https://www.w3.org/TR/xpath-functions-31/#date-picture-string, to truncate the day of the week and the month to 3 letters, we should not append 3 but *,-3, and to ensure a 4-digit year, we should use Y0001 instead of Y04. In other words, the picture string should be:
My testing in BaseX, eXist, and Saxon shows that the picture string from the spec fails to produce the expected output, whereas the modified picture string produces the expected output:
Mon, 06 Jun 1994 07:29:35 +0000
The test expression that produces this expected output:
In https://www.w3.org/TR/xpath-functions-31/#func-parse-ietf-date, a note contains a picture string which should produce an RFC 1123 / IETF-style date:
Given a dateTime like
1994-06-06T07:29:35Z
, applyingfn:format-dateTime
with this picture string should return:But according to the documentation on the picture string at https://www.w3.org/TR/xpath-functions-31/#date-picture-string, to truncate the day of the week and the month to 3 letters, we should not append
3
but*,-3
, and to ensure a 4-digit year, we should useY0001
instead ofY04
. In other words, the picture string should be:"[FNn,*-3], [D01] [MNn,*-3] [Y0001] [H01]:[m01]:[s01] [Z0000]")
… instead of:
"[FNn3], [D01] [MNn3] [Y04] [H01]:[m01]:[s01] [Z0000]"
My testing in BaseX, eXist, and Saxon shows that the picture string from the spec fails to produce the expected output, whereas the modified picture string produces the expected output:
The test expression that produces this expected output:
The text was updated successfully, but these errors were encountered: