Template:Date: Difference between revisions
mNo edit summary |
m added interwiki link |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly>{{#switch:{{#invoke:String|len|s={{{1}}}}} | <includeonly>{{#switch:{{#invoke:String|len|s={{{1}}}}} | ||
|1 |2 |3 |4 |5 = {{#time:Y|{{{1}}} }} | |0 |1 |2 = | ||
|3 |4 |5 = {{#time:Y|{{{1}}} }} | |||
|6 |7 |8 = {{#time:F Y|{{{1}}} }} | |6 |7 |8 = {{#time:F Y|{{{1}}} }} | ||
|9 |10 = {{#time:j F Y|{{{1}}} }} | |9 |10 = {{#time:j F Y|{{{1}}} }} | ||
|#default = <strong class="error">error</strong> | |#default = <strong class="error">error</strong>[[Category:Pages with date format errors]] | ||
}}</includeonly><noinclude>== Examples == | }}</includeonly><noinclude>== Usage == | ||
<pre>{{Date|999}} | In templates, please use the '''YYYY-MM-DD''' format (e.g. 2001-05-01 or 2018-12-28. In article texts, please use the '''DD MMMM YYYY''' format (e.g. <q>1 May 2001</q> or <q>24 December 2018</q>). You may even use the template in article texts outside templates, like this: | ||
<pre>* John Doe was born on {{Date|1950-07-23}}.</pre> | |||
* John Doe was born on {{Date|1950-07-23}}. | |||
== Examples == | |||
<pre>{{Date|}} | |||
{{Date|999}} | |||
{{Date|2019}} | {{Date|2019}} | ||
{{Date|2019-}}</pre> | {{Date|2019-}}</pre> | ||
* {{Date|}} | |||
* {{Date|999}} | * {{Date|999}} | ||
* {{Date|2019}} | * {{Date|2019}} | ||
| Line 27: | Line 35: | ||
* {{Date|2019-12-999}} | * {{Date|2019-12-999}} | ||
* {{Date|01-03-2019}} | * {{Date|01-03-2019}} | ||
<!--[[en:Template:Date]]--> | |||
[[he:Template:Date]] | |||
[[is:Snið:Date]] | |||
[[nl:Sjabloon:Datum]] | |||
</noinclude> | </noinclude> | ||