Template:Sortkey/Documentation

This template returns a hidden string that can be used to enforce a specific sort order in sortable tables.

Usage
The most useful feature of the template is creating chronological sortkeys by using a date. Most date formats will be recognized, such as "January 1, 2011" or "2011-Jan-01". For instance:
 * First unnamed parameter
 * will return  20110101   January 1, 2011.

You can also use this template to create your own sortkey, not based on time, by using the second unnamed parameter by itself. This can be useful for getting text to sort how you want (such as sorting "The Goonies" by the letter "G"). Note that when using the second unnamed parameter, nothing is returned after the sortkey.
 * Second unnamed parameter
 * will return  Goonies, The .

If no parameters are used, the template returns an exclamation point, which will sort before most other characters.
 * No parameters
 * will return  ! .