Difference between revisions of "Template:ISOdate"

From Self-sufficiency
Jump to: navigation, search
(new code again, fixed)
(+1 extra error check)
Line 6: Line 6:
 
| {{{1}}}
 
| {{{1}}}
 
| {{#ifexpr: ({{{1}}} <= 998) and ({{{1}}} >= -11)
 
| {{#ifexpr: ({{{1}}} <= 998) and ({{{1}}} >= -11)
 +
| {{#iferror: {{#time: Y | {{padleft:{{{1}}}|7|0}} }}
 +
| {{{1}}}
 
| {{#ifexpr: ({{#time: Y | {{padleft:{{{1}}}|7|0}} }} >= 1958) and ({{{1}}} <= 98)
 
| {{#ifexpr: ({{#time: Y | {{padleft:{{{1}}}|7|0}} }} >= 1958) and ({{{1}}} <= 98)
 
| {{#ifeq: {{{1}}} | {{#expr: {{#time: y | {{padleft:{{{1}}}|7|0}} }} }}-{{#time: m | {{padleft:{{{1}}}|7|0}} }} | {{date|{{#expr: {{#time: y | {{padleft:{{{1}}}|7|0}} }} }}|{{#time: m | {{padleft:{{{1}}}|7|0}} }}|| {{{2|}}} }} | {{{1}}} }}
 
| {{#ifeq: {{{1}}} | {{#expr: {{#time: y | {{padleft:{{{1}}}|7|0}} }} }}-{{#time: m | {{padleft:{{{1}}}|7|0}} }} | {{date|{{#expr: {{#time: y | {{padleft:{{{1}}}|7|0}} }} }}|{{#time: m | {{padleft:{{{1}}}|7|0}} }}|| {{{2|}}} }} | {{{1}}} }}
 
| {{#ifeq: {{{1}}} | {{#expr: {{#time: Y | {{padleft:{{{1}}}|7|0}} }} }}-{{#time: m | {{padleft:{{{1}}}|7|0}} }} | {{date|{{#expr: {{#time: Y | {{padleft:{{{1}}}|7|0}} }} }}|{{#time: m | {{padleft:{{{1}}}|7|0}} }}|| {{{2|}}} }} | {{{1}}} }}
 
| {{#ifeq: {{{1}}} | {{#expr: {{#time: Y | {{padleft:{{{1}}}|7|0}} }} }}-{{#time: m | {{padleft:{{{1}}}|7|0}} }} | {{date|{{#expr: {{#time: Y | {{padleft:{{{1}}}|7|0}} }} }}|{{#time: m | {{padleft:{{{1}}}|7|0}} }}|| {{{2|}}} }} | {{{1}}} }}
 +
}}
 
}}
 
}}
 
| {{{1}}}
 
| {{{1}}}

Revision as of 04:26, 7 May 2009