Difference between revisions of "Template:Date"
Jump to navigation
Jump to search
m (added link to the Wikipedia documentation) |
m |
||
Line 1: | Line 1: | ||
− | {{ | + | <includeonly>{{#switch:{{#invoke:String|len|s={{{1}}}}} |
− | + | |1 |2 |3 |4 |5 = {{#time:Y|{{{1}}} }} | |
− | | | + | |6 |7 |8 = {{#time:F Y|{{{1}}} }} |
− | + | |9 |10 = {{#time:j F Y|{{{1}}} }} | |
− | + | |#default = <strong class="error">error</strong> | |
− | + | }}</includeonly><noinclude>== Examples == | |
− | + | <pre>{{Date|999}} | |
− | + | {{Date|2019}} | |
− | + | {{Date|2019-}}</pre> | |
− | + | * {{Date|999}} | |
− | + | * {{Date|2019}} | |
− | + | * {{Date|2019-}} | |
− | | | + | <pre>{{Date|2019-3}} |
− | + | {{Date|2019-03}} | |
− | | | + | {{Date|2019-03-}} |
− | | | + | {{Date|03-2019}}</pre> |
− | + | * {{Date|2019-3}} | |
− | + | * {{Date|2019-03}} | |
− | + | * {{Date|2019-03-}} | |
− | + | * {{Date|03-2019}} | |
− | + | <pre>{{Date|2019-12-1}} | |
− | + | {{Date|2019-12-24}} | |
− | + | {{Date|2019-12-999}} | |
− | + | {{Date|01-03-2019}}</pre> | |
− | + | * {{Date|2019-12-1}} | |
− | + | * {{Date|2019-12-24}} | |
− | + | * {{Date|2019-12-999}} | |
− | + | * {{Date|01-03-2019}} | |
− | + | </noinclude> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 13:49, 28 October 2019
Examples
{{Date|999}} {{Date|2019}} {{Date|2019-}}
- Error: Invalid time.
- 2019
- Error: Invalid time.
{{Date|2019-3}} {{Date|2019-03}} {{Date|2019-03-}} {{Date|03-2019}}
- March 2019
- March 2019
- Error: Invalid time.
- Error: Invalid time.
{{Date|2019-12-1}} {{Date|2019-12-24}} {{Date|2019-12-999}} {{Date|01-03-2019}}
- 1 December 2019
- 24 December 2019
- error
- 1 March 2019