Difference between revisions of "Template:ISOdate"
From Self-sufficiency
(add {{{2}}} to make it possible to fix the output language) |
(add new parameter to allow year-only output) |
||
Line 7: | Line 7: | ||
}} | }} | ||
| {{#ifexpr: ({{#ifexpr: {{{1}}} = {{#time: d-m-Y | {{{1}}} }} | 1 | 0 }}) or ({{#ifexpr: {{{1}}} = {{#time: Y-m-d | {{{1}}} }} | 1 | 0 }}) | | {{#ifexpr: ({{#ifexpr: {{{1}}} = {{#time: d-m-Y | {{{1}}} }} | 1 | 0 }}) or ({{#ifexpr: {{{1}}} = {{#time: Y-m-d | {{{1}}} }} | 1 | 0 }}) | ||
− | | {{date| {{#time: Y | {{{1}}} }} | {{#time: n | {{{1}}} }} | {{#time: j | {{{1}}} }} | {{{2|}}} }} | + | | {{date| {{#time: Y | {{{1}}} }} | {{#ifeq: {{uc: {{{f|}}} }} | Y | |{{#time: n | {{{1}}} }}}} | {{#ifeq: {{uc: {{{f|}}} }} | Y | | {{#time: j | {{{1}}} }} }} | {{{2|}}} }} |
| {{#ifexpr: abs({{#expr: {{{1}}} }}) < 100 | | {{#ifexpr: abs({{#expr: {{{1}}} }}) < 100 | ||
| {{#ifexpr: {{#time: Y | {{{1}}} }} >= 2000 | | {{#ifexpr: {{#time: Y | {{{1}}} }} >= 2000 | ||
− | | {{date| {{#expr: {{#time: Y | {{{1}}} }} - 2000 }} |{{#time: n | {{{1}}} }}|{{#time: j | {{{1}}} }}| {{{2|}}} }} | + | | {{date| {{#expr: {{#time: Y | {{{1}}} }} - 2000 }} | {{#ifeq: {{uc: {{{f|}}} }} | Y | |{{#time: n | {{{1}}} }}}} |{{#ifeq: {{uc: {{{f|}}} }} | Y | | {{#time: j | {{{1}}} }}}} | {{{2|}}} }} |
− | | {{date| {{#expr: {{#time: Y | {{{1}}} }} - 1900 }} |{{#time: n | {{{1}}} }}|{{#time: j | {{{1}}} }}| {{{2|}}} }} | + | | {{date| {{#expr: {{#time: Y | {{{1}}} }} - 1900 }} | {{#ifeq: {{uc: {{{f|}}} }} | Y | |{{#time: n | {{{1}}} }}}} |{{#ifeq: {{uc: {{{f|}}} }} | Y | | {{#time: j | {{{1}}} }}}} | {{{2|}}} }} |
}} | }} | ||
| {{#ifexpr: ({{#ifexpr: {{{1}}} = {{#time: m-Y | {{{1}}} }} | 1 | 0 }}) or ({{#ifexpr: {{{1}}} = {{#time: Y-m | {{{1}}} }} | 1 | 0 }}) | | {{#ifexpr: ({{#ifexpr: {{{1}}} = {{#time: m-Y | {{{1}}} }} | 1 | 0 }}) or ({{#ifexpr: {{{1}}} = {{#time: Y-m | {{{1}}} }} | 1 | 0 }}) | ||
− | | {{date|{{#time: Y | {{{1}}} }}|{{#time: n | {{{1}}} }}|| {{{2|}}} }} | + | | {{date| {{#time: Y | {{{1}}} }} | {{#ifeq: {{uc: {{{f|}}} }} | Y ||{{#time: n | {{{1}}} }} }} || {{{2|}}} }} |
| {{{1}}} | | {{{1}}} | ||
}} | }} |
Revision as of 23:43, 15 April 2009
[edit]
Documentation