Template:Dts/doc

Date table sorting is used to correctly sort and display dates in a sortable table (see Help:Sorting).

What it solves
Dates in their customary formats, if simply treated as alphanumeric text strings, sort in nonsensical ways: Use of the YYYY-MM-DD format would solve this problem, but with minor exceptions that format is not used in articles (see WP:DATEFORMAT).
 * 1 September 1998 sorts alphanumerically before 5 March 1967, because 1 is less than 5;
 * February 5, 1922 sorts alphanumerically before January 3, 1922, because F comes before J.

This template automatically attaches a "hidden key" to dates, causing them to sort correctly while still being displayed in one of the customary display formats such as February 5, 1922 or 5 Feb 1922.