Page MenuHomePhabricator

Add ISO/EDTF compliance mode to the #time parser function and mw.language:formatDate function
Open, Needs TriagePublicFeature

Description

Currently, the parser function has inconsistencies with major international standards, making its behavior unpredictable in various scenarios. This complicates the localization of dates. It is necessary to enable the functions to operate directly within date standards ISO/EDTF.

Event Timeline

I would probably suggest doing this either as a new parser function, eg {{#timeiso}}, or as an explicit argument to the time function, eg {{#time:Y-m-d|2025-01-16|en||iso}}, rather than risk changing existing behaviors of {{#time}}. This also allows easier linting for "old" uses of {{#time}}.

I would probably suggest doing this either as a new parser function, eg {{#timeiso}}, or as an explicit argument to the time function, eg {{#time:Y-m-d|2025-01-16|en||iso}}, rather than risk changing existing behaviors of {{#time}}. This also allows easier linting for "old" uses of {{#time}}.

Yes, I completely agree that this should be a separate parser function or separate argument.