[doc-en] master: Fix the CLF and WDDX rows of the compound formats table (#3410)
| From: | Anders Pedersen via GitHub | Date: | Thu, 03 Sep 2026 12:33:37 +0000 |
| Subject: | [doc-en] master: Fix the CLF and WDDX rows of the compound formats table (#3410) | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-23712@lists.php.net to get a copy of this message | ||
Author: Anders Pedersen (genius257)
Committer: GitHub (web-flow)
Pusher: lacatoire
Date: 2026-09-03T14:33:34+02:00
Commit: https://github.com/php/doc-en/commit/7a6040b9cd004863db74a49acb1326308c9e0063
Raw diff: https://github.com/php/doc-en/commit/7a6040b9cd004863db74a49acb1326308c9e0063.diff
Fix the CLF and WDDX rows of the compound formats table (#3410)
The Common Log Format row was missing the quotes around its ":"
separator, unlike every other literal on that line.
Both rows use the dd and mm symbols, which were not defined in the
"Used Symbols" table of this section; copy their definitions (and
daysuf) from the date formats table.
The hh symbol is also documented as the 12-hour clock, but every
compound format that uses it (XMLRPC, WDDX, tzcorrection) maps to the
hour24 parsing rule, as the existing "20080701T22:38:07" example
already shows. Define it accordingly.
Rules checked against ext/date/lib/parse_date.re:
clf = day "/" monthabbr "/" year4 ":" hour24lz ":"
minutelz ":" secondlz space tzcorrection;
wddx = year4 "-" month "-" day "T" hour24 ":" minute
":" second;
day = (([0-2]?[0-9]) | ("3"[01])) daysuf?;
month = "0"? [0-9] | "1"[0-2];
hour24 = [01]?[0-9] | "2"[0-4];
Changed paths:
M reference/datetime/formats.xml
Diff:
diff --git a/reference/datetime/formats.xml b/reference/datetime/formats.xml
index ad3fb08a8be5..afa5a5e21339 100644
--- a/reference/datetime/formats.xml
+++ b/reference/datetime/formats.xml
@@ -622,6 +622,16 @@ object(DateTimeImmutable)#1 (3) {
</row>
</thead>
<tbody>
+ <row>
+ <entry><literal>daysuf</literal></entry>
+ <entry>"st" | "nd" | "rd" | "th"</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry><literal>dd</literal></entry>
+ <entry>([0-2]?[0-9] | "3"[01])
<literal>daysuf</literal>?</entry>
+ <entry>"7th", "22nd", "31"</entry>
+ </row>
<row>
<entry><literal>DD</literal></entry>
<entry>"0" [0-9] | [1-2][0-9] | "3" [01]</entry>
@@ -639,8 +649,8 @@ object(DateTimeImmutable)#1 (3) {
</row>
<row>
<entry><literal>hh</literal></entry>
- <entry>"0"?[1-9] | "1"[0-2]</entry>
- <entry>"04", "7", "12"</entry>
+ <entry>[01]?[0-9] | "2"[0-4]</entry>
+ <entry>"04", "9", "19"</entry>
</row>
<row>
<entry><literal>HH</literal></entry>
@@ -667,6 +677,11 @@ object(DateTimeImmutable)#1 (3) {
<entry>'jan' | 'feb' | 'mar' | 'apr' |
'may' | 'jun' | 'jul' | 'aug' | 'sep' |
'sept' | 'oct' | 'nov' | 'dec'</entry>
<entry></entry>
</row>
+ <row>
+ <entry><literal>mm</literal></entry>
+ <entry>"0"? [0-9] | "1"[0-2]</entry>
+ <entry>"0", "04", "7", "12"</entry>
+ </row>
<row>
<entry><literal>MM</literal></entry>
<entry>[0-1][0-9]</entry>
@@ -785,7 +800,7 @@ object(DateTimeImmutable)#1 (3) {
<tbody>
<row>
<entry>Common Log Format</entry>
- <entry><literal>dd</literal> "/" <literal>M</literal>
"/" <literal>YY</literal> : <literal>HH</literal> ":"
<literal>II</literal> ":" <literal>SS</literal>
<literal>space</literal> <literal>tzcorrection</literal></entry>
+ <entry><literal>dd</literal> "/" <literal>M</literal>
"/" <literal>YY</literal> ":" <literal>HH</literal>
":" <literal>II</literal> ":" <literal>SS</literal>
<literal>space</literal> <literal>tzcorrection</literal></entry>
<entry>"10/Oct/2000:13:55:36 -0700"</entry>
</row>
<row>