Template:Citation/fixdate/doc

This is a helper routine for citation/core that fixes dates if (and only if) they are in the deprecated yyyy-mm-dd format.


 * If the input (passed here as parameter #1) is not in yyyy-mm-dd format, this helper routine merely emits it unchanged.
 * If the input is in yyyy-mm-dd format, then this helper routine converts is to "international" format ('' or whatever). If that format is not appropriate for the article in question, then the editor need only write out his/her dates in whatever form is appropriate (in which case the date is then no longer in yyyy-mm-dd format and it gets emitted unchanged).

Examples of it in action: A date in any other format will be emitted unchanged, as seen in the following, which are all valid expressions of a date in a citation.

Please do not be tempted to get fancy with this template, or to substitute it with date, which can neither handle the range of possible date styles, nor (given that templates have no string manipulation functions available to them) can it be expected to. The only field that can safely be passed on to   is access-date=, and that is only because access-date= can be expected to be a calendar date.

Valid input range
Dates will be recognized and reformatted if they are valid dates in the Gregorian calendar or Proleptic Gregorian calendar. Dates which are valid in the Julian calendar but not the Gregorian calendar (such as 1700-02-29) will not be recognized or reformatted. Also, the earliest recognized date is 0000-01-01 and the latest recognized date is 9999-12-31.