Template:Date table sorting

From Meta, a Wikimedia project coordination wiki
(Redirected from Template:Dts)
Jump to navigation Jump to search
Template documentation

Usage[edit]

Generates a localised date with appropriate attributes to make it sortable in a table.

{{Date table sorting|date=2020-09-24|format=j F Y|lang=fr}}

displays: and sorts well in a table.

Arguments[edit]

lang
Language code (usually, you should pass {{PAGELANGUAGE}}).
format
Deprecated (kept for backware compatibility)
phpformat
Date display format: any string supported by {{#time}} (you can read its documentation page). Defaults to "j xg Y" (e.g. “6 January 2020”).
precision
Instead of setting a phpformat, the module can guess it from date precision integer: 9 will display only year, 10 will display month and year, and 11 will display day, month and year. These values come from Wikidata date data model.
date
full date (takes precedence over other date arguments)
year
year (takes precedence over numbered date arguments)
month
month (works only if year is set)
day
day (works only if both year and month are set)
1
full date or year
2
month (works only if 1 is set)
3
day (works only if both 1 and 2 are set)