Difference between revisions of "Template:Date"

From Timelines
Jump to: navigation, search
(option for no formatting)
(if no first parameter, use current date thanks to #time defaults)
Line 2: Line 2:
  
 
< -- TEST IF DATE IS CORRUPT OR A FRAGMENT -- >
 
< -- TEST IF DATE IS CORRUPT OR A FRAGMENT -- >
-->{{#ifeq:{{#time:Y_M_d|{{{1}}} 2037}} | {{#iferror: {{#time:Y_M_d|{{{1}}} }} | *ERROR* }}
+
-->{{#ifeq:{{#time:Y_M_d|{{{1|}}} 2037}} | {{#iferror: {{#time:Y_M_d|{{{1|}}} }} | *ERROR* }}
 
  |{{#ifeq: {{{3|}}}|y
 
  |{{#ifeq: {{{3|}}}|y
 
   |{{#switch: {{{2|}}}
 
   |{{#switch: {{{2|}}}
 
     | asis | none    = {{{1|}}}
 
     | asis | none    = {{{1|}}}
     | mdy            = [[{{ #time:F j|{{{1}}} }}]], [[{{ #time:Y|{{{1}}} }}]]
+
     | mdy            = [[{{ #time:F j|{{{1|}}} }}]], [[{{ #time:Y|{{{1|}}} }}]]
     | iso | ymd      = [[{{ #time:Y|{{{1}}} }}]] [[{{ #time:F j|{{{1}}} }}|{{ #time:m-d|{{{1}}} }}]]
+
     | iso | ymd      = [[{{ #time:Y|{{{1|}}} }}]] [[{{ #time:F j|{{{1|}}} }}|{{ #time:m-d|{{{1|}}} }}]]
     | dmy | #default = [[{{ #time:j F|{{{1}}} }}]] [[{{ #time:Y|{{{1}}} }}]]
+
     | dmy | #default = [[{{ #time:j F|{{{1|}}} }}]] [[{{ #time:Y|{{{1|}}} }}]]
 
   }}
 
   }}
 
   |{{#switch: {{{2|}}}
 
   |{{#switch: {{{2|}}}
 
     | asis | none    = {{{1|}}}
 
     | asis | none    = {{{1|}}}
     | mdy            = {{ #time:F j, Y|{{{1}}} }}  
+
     | mdy            = {{ #time:F j, Y|{{{1|}}} }}  
     | iso | ymd      = {{ #time:Y-m-d|{{{1}}} }}
+
     | iso | ymd      = {{ #time:Y-m-d|{{{1|}}} }}
     | dmy | #default = {{ #time:j F Y|{{{1}}} }}
+
     | dmy | #default = {{ #time:j F Y|{{{1|}}} }}
 
   }}
 
   }}
 
   }}   
 
   }}   

Revision as of 01:46, 17 November 2008

Template documentation[create]