Anonymous edits have been disabled on the wiki. If you want to contribute please login or create an account.


Warning for game developers: PCGamingWiki staff members will only ever reach out to you using the official press@pcgamingwiki.com mail address.
Be aware of scammers claiming to be representatives or affiliates of PCGamingWiki who promise a PCGW page for a game key.

Topic on Template talk:Upscaling list

Shamanincap (talkcontribs)

Release date sorting don't actually sort by date. I tried to change dates in 12 May 2022 format, but it still didn't work. Maybe header require (data-sort-type="isoDate")?



Guide icon.svg
This is a requested edit. This notice will be removed when resolved.
Aemony (talkcontribs)

data-sort-type="isoDate" doesn't really solve it either since it requires dates in the ISO 8601 format, which is already sorted alphabetically (meaning "correct") even without that sort type.

The typical way we have solved this issue is by having the row template add a custom data-sort-value="" value to the cell that has the date in an ISO 8601 format, which then gets used when sorted by that column.

The problem however is that it's a costly operation, and anything like (Early Access) or generally non-date input will cause the sorting to break -- sometimes in unexpected ways.

I have added a basic initial edit that uses the unfiltered date input as the sorting value, while displaying it as mdy (January 5, 2021). This means the dates on each row can/needs to be changed to ISO 8601 format, which will allow the sorting to work by that value while still displaying them as January 5, 2021 publicly.

Aemony (talkcontribs)
Shamanincap (talkcontribs)

Well, not the way i read it in docs, but you changed it perfectly. Thanks

Upd: At least from that we can do the rest of dates

Aemony (talkcontribs)

Yeah, I need to test this out more -- last I tried "isoDate" it didn't actually do anything, but upon reading some of the docs it is suggested that it should be able to handle our Month Day, Year format.

The current workaround I've used of explicitly using ISO 8601 format and converting it to Month Day, Year format when displayed is ultimately a costly operation that I would've been glad to avoid if we could.