Page MenuHomePhabricator

Sort <time> tag as date using datetime attribute
Open, Needs TriagePublicFeature

Description

When sorting a table, cells containing a <time> tag should be considered as a date instead of text.
If the tag contain a datime attribute it should be used to determine the date (ISO format), otherwise the cell content should be used (ISO too if it follow HTML5 standard)

Example of valid time tag :
<time datetime="2016-11-07">Monday, November 7, 2016</time>
<time>2016-11-07</time>

Event Timeline

matmarex subscribed.

This shouldn't be difficult to implement. We handle <img alt="…">, which is basically the same thing in this context. See the getElementSortKey() function in tablesorter source code.

Change 325916 had a related patch set uploaded (by Harish halo):
Add <time> as date in ISO format when sorted

https://gerrit.wikimedia.org/r/325916

Change 325916 abandoned by Harish halo:
Add <time> as date in ISO format when sorted

Reason:
Wrong and looks complex with parsing, hence i thought we can go with 325915 itself.

https://gerrit.wikimedia.org/r/325916

Change 325916 restored by Harish halo:
Add <time> as date in ISO format when sorted

https://gerrit.wikimedia.org/r/325916

Aklapper edited projects, added Patch-Needs-Improvement; removed Patch-For-Review.
Aklapper added a subscriber: haloxwiz.

Removing inactive task assignee

Change 325916 abandoned by Thiemo Kreuz (WMDE):
[mediawiki/core@master] Add <time> as date in ISO format when sorted

Reason:
Inactive for 4 years and very incomplete anyway, as far as I can see.

https://gerrit.wikimedia.org/r/325916

@Annysah01: Hi! This task has been assigned to you a while ago. How is it going? Do you need any help?

@Annysah01: I am resetting the assignee of this task because there has not been progress lately (please correct me if I am wrong!). Please claim this task again when you plan to work on it (via Add Action...Assign / Claim in the dropdown menu) - it would be welcome. Thanks for your understanding!

Change 645530 had a related patch set uploaded (by Diwanshu885; owner: Diwanshu885):
[mediawiki/core@master] Modify the 'getElementSortKey()' function to add <time>

https://gerrit.wikimedia.org/r/645530

Aklapper added a subscriber: Diwanshu885.

@Diwanshu885: Removing task assignee as this open task has been assigned for more than two years - See the email sent to task assignee on Feburary 22nd, 2023.
Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome! :)
If this task has been resolved in the meantime, or should not be worked on by anybody ("declined"), please update its task status via "Add Action… 🡒 Change Status".
Also see https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator. Thanks!

Izno changed the subtype of this task from "Task" to "Feature Request".Apr 18 2025, 5:18 AM