Permanently protected template

Template:D

From Historical Hastings
Template documentation[view] [edit] [history] [purge]

Purpose: Formats date according to user preference. Preference is set with language preference. English-Great Britain (en-gb) gets day-month-year order as well as all other non En languages. If user preference is en, then US/Canada Month-day-year order is used.

Parameter 1: Recognized:

  • Year only- no error checks- just passes the value
  • Three orders, dependent on delimiter
    • Month/Day/Year
    • Day Month Year
    • Year-Month-Day
  • Months may be a number, a month name in english, or a three letter english abbreviation
  • Illegal day values identified (February 29 in a non leap year)

Other parameters

  • link: If any value besides null, this links the date. If day provided, then first link is to month and day. Otherwise only the year is linked.
Examples
user language
wikitext en en-gb, es, fr...
3 Nov 1876}} November 3, 1876      3 November 1876
November 1876}} November 1876 November 1876
1876-11-3}} November 3, 1876 3 November 1876
11/3/1876}} November 3, 1876 3 November 1876