FANDOM


Description
  • This template accepts parameters for year, month, and day, and returns a date formatted in TrainStation Wiki's preferred style. Currently, this format is dd MMM yyyy, where dd= day of month without leading zero, MMM= 3-letter abbreviation for month in English, and yyyy= 4-digit year.
  • This template solves the problems of ambiguous date formatting, inconsistent date formatting, and inconsistent appearance of formatted dates when viewed by unregistered users.
  • For compatibility with previous versions of the template, invalid input will be returned unchanged in most cases.
Syntax
Long format (preferred) - Named parameters. Other templates calling this template always use this format.
{{Date|<year=xxxx>|<month=xx>|<day=xx>|<break=y (optional)>}}
  • All x's represent numbers only.
  • Parameter 'day' may be omitted if unknown.
  • Optional parameter 'break' uses a normal (breaking) space between the month and the year in the output. If not present, output uses non-breaking space by default.
Quick format - Unnamed parameters. Users manually typing a template call may save time by omitting the parameter names.
{{Date|<xxxx>|<xx>|<xx>}}
  • Unnamed parameters must appear in this order: year, month, day.
  • All x's represent numbers only.
  • Third parameter (day) may be omitted if unknown.
  • Optional parameter 'break' is not available using quick format. Use long format instead.
Sample output
The template accepts input with or without leading zeros. Output strips leading zero from day.
Long format
{{Date|year=2012|month=02|day=09}}
gives: 9 Feb 2012
{{Date|year=2012|month=2|day=9}}
gives: 9 Feb 2012
{{Date|year=2012|month=10}}
gives: Oct 2012
Quick format
{{Date|2012|02|09}}
gives: 9 Feb 2012
{{Date|2012|2|9}}
gives: 9 Feb 2012
{{Date|2012|10}}
gives: Oct 2012
Invalid input - Output unchanged
{{Date|2012-9-14}}
gives: 2012-9-14
{{Date|date=October 10, 2012}}
gives: October 10, 2012
Invalid input - Output changed
{{Date|year=2012|month=13|day=5}}
gives: 5 ??? 2012
{{Date|month=12|day=15}}
gives: 15 
Community content is available under CC-BY-SA unless otherwise noted.