Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#13547 closed (fixed)

Date format character c does not conform to ISO 8601

Reported by: jl6 Owned by: nobody
Component: Template system Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


The documentation for the now and date built-in filters claims that the "c" format character produces a date in ISO 8601 format, i.e. 1996-01-01T12:05:25, but it actually outputs a space instead of the "T" separator. This means that, for example, it cannot be used in the datetime attribute of an HTML5 time element.

Attachments (1)

13547-docs.diff (2.8 KB) - added by Ramiro Morales 6 years ago.
Docuemntation fixes related to this change

Download all attachments as: .zip

Change History (4)

comment:1 Changed 6 years ago by Jannis Leidel

milestone: 1.31.2
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

While ISO 8601 doesn't state that it requires the "T" separator to actual form a meaningful combination of a date and a time value, I see your point with regard to real world usefulness. As long as there are no objections I'd like to fix this before we release 1.2, too. Refs #7262 and r12058.

comment:2 Changed 6 years ago by Jannis Leidel

Resolution: fixed
Status: newclosed

(In [13266]) Fixed #13547 -- Made sure the ISO 8601 date formatting introduced in r12058 uses "T" as the separator between the date and the time value to increase real world usefulness.

While the ISO standard permits the use of a space instead of "T" for readability, it does have an impact on standards like HTML5 which rely on specific rules made in RFC 3339.

Changed 6 years ago by Ramiro Morales

Attachment: 13547-docs.diff added

Docuemntation fixes related to this change

comment:3 Changed 5 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

Note: See TracTickets for help on using tickets.
Back to Top