Page MenuHomePhabricator

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


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>

Event Timeline

matmarex added a subscriber: matmarex.

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

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

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

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

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

Removing inactive task assignee

Annysah01 added a subscriber: Annysah01.

Hello @Aklapper Can I work on this?

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

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

@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>