Template:Daterangedash/doc

This template creates a date range with non-breaking spaces between the month and day, and spaced ndash.

Usage
 

Both date values can be in any format accepted by PHP's strtotime function.
 * Starting date is the starting date for the range.
 * Ending Date is the ending date for the range.
 * Date format string is one of the following:
 * : day month (1 January)
 * : day month year (1 January 1900)
 * : month day (January 1)
 * : month day year (January 1, 1900) – note: a comma will be inserted

If both start and end dates are in the same year, the first year will be omitted. There is no error checking to ensure the start date occurs before the end date.

Known issues
Because this makes use of the #time parser function, it is subject to the function's limitations. For example, it only works for dates between 1 January 111 and 31 December 9999. Furthermore, three-digit years will be displayed with a leading zero:, not.