sorting dates in tables

From semantic-mediawiki.org

I don't quite get the example regarding sorting dates in a table. Who would want an extra table with the sortkey displayed?

{{#ask:
 [[Modification date::+]]
 |?Modification date
 |?Modification date#SORTKEY
}}

I have seen SMW doing it wrong, but in sandbox everything works fine: https://sandbox.semantic-mediawiki.org/wiki/Date_sorting_in_tables

So why would I need #SORTKEY and how would I use it?

08:41, 9 May 2019

> I don't quite get the example regarding sorting dates in a table. Who would want an extra table with the sortkey displayed?

I don't know either but the function is available at least since 1.7.1 [0] and returns the JD of the date which is also used internally to sort dates.

> I have seen SMW doing it wrong

Where and in which context?

> So why would I need #SORTKEY and how would I use it?

[0] is the PR that introduced the output format and notes "new output format "sortkey" to help people who want to handcraft sortable tables containing date values".

[0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/commit/34645e5ecf8044894541445305113b05f3cc0cbd

Cheers

02:44, 11 May 2019