Template:Date sortable/doc

For dates from January 1, 1970 onward only!

(This template was formerly named, i.e. Date table sorting for video game release dates)

Usage
Normally, for proper sorting, dates must be entered in YYYY-MM-DD format. But this does not conform to the Manual of Style for date display and wikilinking. Like dts, this template automatically creates the hidden  for sorting purposes and then displays and wikilinks the date properly depending on the user's preferences. In accordance with current guidelines, this template does not hotlink dates. Also, if you input only a year and month, then it must be in this format:.

By default this template outputs dates in "verbose" format. This can be turned off by setting the optional parameter, v, to equal zero, in which case dates are outputted in YYYY-MM-DD format. Setting v to equal 2 forces the "D MONTHNAME YYYY" format.

If for some reason you need to pass a value that is not a valid date (such as "TBD" or "TBA"), or if you do so by accident, the inputted value is returned unchanged.

Don't use this template with dates before 1970, as it relies upon the  parser function.