Difference between revisions of "Template:Date"
From Timelines
(Only return hcard if valid date) |
(try better corruption check) |
||
Line 1: | Line 1: | ||
− | < | + | <onlyinclude><!-- |
− | + | ||
− | + | < -- TEST IF DATE IS CORRUPT OR OUT OF RANGE -- > | |
− | + | -->{{#iferror: {{#time:Y|{{{1|}}} {{#iferror:{{#time:Y|{{{1|}}} 1999}}||*ERROR*}} | |
− | + | |{{{1|}}} | |
− | + | |{{#ifeq: {{{3|}}}|y | |
− | + | |{{#switch: {{{2|}}} | |
− | + | | mdy = [[{{ #time:F j|{{{1}}} }}]], [[{{ #time:Y|{{{1}}} }}]] | |
− | + | | iso | ymd = [[{{ #time:Y|{{{1}}} }}]] [[{{ #time:F j|{{{1}}} }}|{{ #time:m-d|{{{1}}} }}]] | |
− | + | | dmy | #default = [[{{ #time:j F|{{{1}}} }}]] [[{{ #time:Y|{{{1}}} }}]] | |
− | + | }} | |
− | + | |{{#switch: {{{2|}}} | |
− | + | | mdy = {{ #time:F j, Y|{{{1}}} }} | |
− | + | | iso | ymd = {{ #time:Y-m-d|{{{1}}} }} | |
− | + | | dmy | #default = {{ #time:j F Y|{{{1}}} }} | |
− | + | }} | |
− | + | }} | |
− | }} | + | }}</onlyinclude> |
− | }} | + | {{documentation}} |
− | |||
− | }}</ |
Revision as of 06:22, 12 November 2008
{{#iferror: Error: Invalid time.
Template documentation[create]
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |