Template:Date/doc

{{TemplateBox


 * 1     = year
 * 1aliases= 1
 * 1d-en = Year number
 * 1label = year
 * 1d-td = year
 * 1type = number
 * 1stat = optional


 * 2     = month
 * 2aliases= 2
 * 2d-en = Month number or name (in English)
 * 2label = month
 * 2d-td = month
 * 2type = number
 * 2stat = optional


 * 3     = day
 * 3aliases= 3
 * 3d-en = Day number
 * 3label = day
 * 3d-td = day
 * 3type = number
 * 3stat = optional


 * 4     = hour
 * 4d-en = Hour number in 0-23 range
 * 4label = hour
 * 4d-td = hour
 * 4type = number
 * 4stat = optional


 * 5     = minute
 * 5d-en = Minutes number in 0-59 range
 * 5label = minute
 * 5d-td = minute
 * 5type = number
 * 5stat = optional


 * 6     = second
 * 6d-en = Seconds number in 0-59 range
 * 6label = second
 * 6d-td = second
 * 6type = number
 * 6stat = optional


 * 14     = lang
 * 14aliases= 4
 * 14d-en = Language code (overrides user's preferences)
 * 14label = language
 * 14d-td = language
 * 14type = string
 * 14def  = language code of the user language
 * 14stat = optional

Also Partitive (ptv), Inessive (ine), Elative (ela) and Illative (ill) cases are supported for Finnish language, in addition to Nominative and Genitive (gen).
 * 15=case
 * 15alias= form
 * 15d-en=allows to specify grammatical case for the month for languages that use them. Possible cases:
 * leave blank for nominative case
 * "case=gen" for genitive case
 * "case=loc" for locative case (supported for pl, cs & sl languages)
 * "case=ins" for instrumental case (supported for ru, pl, cs & sl languages)
 * 15label = case
 * 15d-td = case
 * 15stat = optional-


 * 16=class
 * 16d-en=allows to set the html class of the time node where the date is included. This is useful for microformats. The default value is, for legacy reasons, "dtstart" (used by hCalendar). See the microformats project. "class=" will remove all metadata.
 * 16label = class
 * 16d-td = class
 * 16def  = dtstart
 * 16stat = optional-


 * 17=trim_year
 * 17d-en=Should years smaller than 1000 be padded with zeros to the length of 4 digits or trimmed. Options:
 * 1, yes, true - for always trimming
 * 0, no, false - for always padding
 * xx-yy - where xx is a minimum trimmed year and yy is the maximum trimmed year, for conditional trimming which depends on the year range.
 * 17label =
 * 17d-td =
 * 17def  = 100-999
 * 17stat = optional-


 * name=Date
 * desc=This template is used to show a date in the language set in the preferences.

You can leave out parts of the data. Examples:
 * namespace=Template
 * usergroup=all
 * usage-notes=
 * {{xpdoc|date|2009|1|9}}
 * {{xpdoc|date|2009|1|9|pl}}
 * {{xpdoc|date|2009|1|9|pl|n1=form|v1=}} - alternative way to get nominative case
 * {{xpdoc|date|2009|1|9|pl|n1=form|v1=gen}}
 * {{xpdoc|date|2009|1|9|pl|n1=form|v1=ins}}
 * {{xpdoc|date|2009|1||pl}}
 * {{xpdoc|date|2009|1||pl|n1=form|v1=gen}}
 * {{xpdoc|date|2009|1||pl|n1=form|v1=ins}}
 * {{xpdoc|date|n1=year|v1=888|n2=lang|v2=pl|n3=form|v3=ins|n4=trim_year|v4=yes}}
 * {{xpdoc|date|n1=year|v1=888|n2=lang|v2=pl|n3=form|v3=ins|n4=trim_year|v4=no}}
 * {{xpdoc|date|n1=year|v1=888|n2=lang|v2=pl|n3=form|v3=ins|n4=trim_year|v4=100-999}}
 * {{xpdoc|date|n1=year|v1=888|n2=lang|v2=pl|n3=form|v3=ins|n4=trim_year|v4=100-500}}

Microformat
The template returns the date, embed in a element with attribute datetime that contain the date in the ISO 8601 format needed by the hCalendar   microformat. See the microformats project. }}
 * type=marker
 * example=
 * i18n-method=
 * i18n-desc=Localize the date format at Module:I18n/date or request assistance at Template talk:Date or Module talk:I18n/date
 * seealso=ISOdate – Template used to parse the date in information other date - Allows to specify a range of non-trivial date notations in a format that is localizable
 * setscats=
 * lines=one
 * shorthand=
 * relieson=Module:Date