Difference between revisions of "Template:ISOdate"
From Self-sufficiency
(lowering the inclusion depth) |
(show only year when "f=Y" is set) |
||
Line 7: | Line 7: | ||
{{#switch: 1 | {{#switch: 1 | ||
|{{#ifexpr: ({{{1}}} <= 998) and ({{{1}}} >= -11) and ({{#iferror: {{#time: Y | {{padleft:{{{1}}}|7|0}} }}|1|0}}=1)|1}}={{{1}}} | |{{#ifexpr: ({{{1}}} <= 998) and ({{{1}}} >= -11) and ({{#iferror: {{#time: Y | {{padleft:{{{1}}}|7|0}} }}|1|0}}=1)|1}}={{{1}}} | ||
− | |{{#ifexpr: ({{{1}}} <= 998) and ({{{1}}} >= -11) and ({{#ifexpr: ({{#time: Y | {{padleft:{{{1}}}|7|0}} }} >= 1958) and ({{{1}}} <= 98) |1|0}}=1)|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|}}} |form= {{{form|}}} }} | {{#ifeq: {{{1}}} | {{#expr: {{#time: y | {{padleft:{{{1}}}|7|0}} }} }}-{{#time: m | {{padleft:{{{1}}}|7|0}} }}-{{#time: d | {{padleft:{{{1}}}|7|0}} }} | {{date|{{#expr: {{#time: y | {{padleft:{{{1}}}|7|0}} }} }}|{{#time: m | {{padleft:{{{1}}}|7|0}} }}|{{#time: d | {{padleft:{{{1}}}|7|0}} }}| {{{2|}}} |form= {{{form|}}} }} | {{{1}}} }} }} | + | |{{#ifexpr: ({{{1}}} <= 998) and ({{{1}}} >= -11) and ({{#ifexpr: ({{#time: Y | {{padleft:{{{1}}}|7|0}} }} >= 1958) and ({{{1}}} <= 98) |1|0}}=1)|1}}={{#ifeq: {{{1}}} | {{#expr: {{#time: y | {{padleft:{{{1}}}|7|0}} }} }}-{{#time: m | {{padleft:{{{1}}}|7|0}} }} | {{date|{{#expr: {{#time: y | {{padleft:{{{1}}}|7|0}} }} }}| {{#ifeq: {{uc: {{{f|}}} }} | Y | | {{#time: m | {{padleft:{{{1}}}|7|0}} }}}}|| {{{2|}}} |form= {{{form|}}} }} | {{#ifeq: {{{1}}} | {{#expr: {{#time: y | {{padleft:{{{1}}}|7|0}} }} }}-{{#time: m | {{padleft:{{{1}}}|7|0}} }}-{{#time: d | {{padleft:{{{1}}}|7|0}} }} | {{date|{{#expr: {{#time: y | {{padleft:{{{1}}}|7|0}} }} }}| {{#ifeq: {{uc: {{{f|}}} }} | Y | | {{#time: m | {{padleft:{{{1}}}|7|0}} }}}}| {{#ifeq: {{uc: {{{f|}}} }} | Y | | {{#time: d | {{padleft:{{{1}}}|7|0}} }}}}| {{{2|}}} |form= {{{form|}}} }} | {{{1}}} }} }} |
− | |{{#ifexpr: ({{{1}}} <= 998) and ({{{1}}} >= -11)|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|}}} |form= {{{form|}}} }} | {{#ifeq: {{{1}}} | {{#expr: {{#time: Y | {{padleft:{{{1}}}|7|0}} }} }}-{{#time: m | {{padleft:{{{1}}}|7|0}} }}-{{#time: d | {{padleft:{{{1}}}|7|0}} }} | {{date|{{#expr: {{#time: Y | {{padleft:{{{1}}}|7|0}} }} }}|{{#time: m | {{padleft:{{{1}}}|7|0}} }}|{{#time: d | {{padleft:{{{1}}}|7|0}} }}| {{{2|}}} |form= {{{form|}}} }} | {{{1}}} }} }} | + | |{{#ifexpr: ({{{1}}} <= 998) and ({{{1}}} >= -11)|1}}={{#ifeq: {{{1}}} | {{#expr: {{#time: Y | {{padleft:{{{1}}}|7|0}} }} }}-{{#time: m | {{padleft:{{{1}}}|7|0}} }} | {{date|{{#expr: {{#time: Y | {{padleft:{{{1}}}|7|0}} }} }}| {{#ifeq: {{uc: {{{f|}}} }} | Y | | {{#time: m | {{padleft:{{{1}}}|7|0}} }}}}|| {{{2|}}} |form= {{{form|}}} }} | {{#ifeq: {{{1}}} | {{#expr: {{#time: Y | {{padleft:{{{1}}}|7|0}} }} }}-{{#time: m | {{padleft:{{{1}}}|7|0}} }}-{{#time: d | {{padleft:{{{1}}}|7|0}} }} | {{date|{{#expr: {{#time: Y | {{padleft:{{{1}}}|7|0}} }} }}| {{#ifeq: {{uc: {{{f|}}} }} | Y | | {{#time: m | {{padleft:{{{1}}}|7|0}} }}}}| {{#ifeq: {{uc: {{{f|}}} }} | Y | | {{#time: d | {{padleft:{{{1}}}|7|0}} }}}}| {{{2|}}} |form= {{{form|}}} }} | {{{1}}} }} }} |
|#default={{{1}}} | |#default={{{1}}} | ||
}} | }} |
Revision as of 19:02, 17 September 2010
[edit]
Documentation