Page MenuHomePhabricator

Support ISO date invervals in #time parser function
Open, Needs TriagePublicFeature

Description

Feature summary (what you would like to be able to do and where):
The ISO standard suggests that I can represent date intervals in the following format YYYY-MM-DD/DD, YYYY-MM/MM-DD, `YYYY-MM/MM etc. It would be useful to be able to convert data from dates into readable intervals:

2024-03-12/1512-15 March 2024
2024-03-12/04-1512 March - 15 April 2024
2024-03/04March - April 2024

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):
At the moment, I am thinking about how to adapt normal display of dates in citations for all languages ​​with minimal pain. For now, I can say that the only way is to convert to ISO format and then convert to the desired language. Intervals is a big part of citations.

Benefits (why should this be implemented?):
This will allow modules such as https://en.wikipedia.org/wiki/Module:Citation/CS1 to provide dates in the required language more efficiently.

Event Timeline

Iniquity renamed this task from Support ISO date ranges in #time parser function to Support ISO date invervals in #time parser function.Dec 2 2024, 7:12 PM
Iniquity added a project: ParserFunctions.
Iniquity added a project: I18n.

Please add this to a new {{#timeiso}} parser function, so as not to risk altering the outputs for existing uses of {{#time}}.