Skip to content

Fixed formats and example for localized notations under compound formats - #3410

Merged
lacatoire merged 1 commit into
php:masterfrom
genius257:patch-1
Sep 3, 2026
Merged

Fixed formats and example for localized notations under compound formats#3410
lacatoire merged 1 commit into
php:masterfrom
genius257:patch-1

Conversation

@genius257

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread reference/datetime/formats.xml Outdated
Comment thread reference/datetime/formats.xml Outdated
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];
@lacatoire
lacatoire merged commit 7a6040b into php:master Sep 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants