Difference between revisions of "Template:ISOdate"
From Self-sufficiency
(fixes for some forms of date in the first century) |
(fix missing error check) |
||
Line 16: | Line 16: | ||
}} | }} | ||
}} | }} | ||
− | | {{#ifexpr: ({{#ifeq: {{padleft:{{{1}}}|8|#}} | #{{{1}}} | 1 | 0 }}) and ({{#ifexpr: {{{1}}} > 100 | 1 | 0 }}) | {{date| {{#expr: {{#time: Y | {{{1}}}-01 }} }} | {{#ifeq: {{uc: {{{f|}}} }} | Y | |{{#time: n | {{{1}}}-01 }}}} || {{{2|}}} |form= {{{form|}}} }} | {{#switch: {{{1}}} | + | | {{#ifexpr: ({{#ifeq: {{padleft:{{{1}}}|8|#}} | #{{{1}}} | 1 | 0 }}) and ({{#iferror: {{#expr: {{{1}}} > 100 }} | 0 | {{#ifexpr: {{{1}}} > 100 | 1 | 0 }} }}) | {{date| {{#expr: {{#time: Y | {{{1}}}-01 }} }} | {{#ifeq: {{uc: {{{f|}}} }} | Y | |{{#time: n | {{{1}}}-01 }}}} || {{{2|}}} |form= {{{form|}}} }} | {{#switch: {{{1}}} |
|{{#expr: {{#time:Y| {{{1}}} }} - 1900 }}-{{#time:m-d H:i:sZ| {{{1}}} }} | |{{#expr: {{#time:Y| {{{1}}} }} - 1900 }}-{{#time:m-d H:i:sZ| {{{1}}} }} | ||
|{{#expr: {{#time:Y| {{{1}}} }} - 1900 }}-{{#time:m-d H:i:s| {{{1}}} }}={{date| {{#expr: {{#time:Y| {{{1}}} }} - 1900 }} | {{#ifeq: {{uc: {{{f|}}} }} | Y | |{{#time: n | {{{1}}} }}}} | {{#ifeq: {{uc: {{{f|}}} }} | Y | | {{#time: j | {{{1}}} }} }} | {{{2|}}} |form= {{{form|}}} }}{{#ifeq: {{uc: {{{f|}}} }} | Y | | {{date-time separator|{{{2|}}}}}{{Time|{{#time: H | {{{1}}} }}|{{#time: i | {{{1}}} }}|{{#time: s | {{{1}}} }}|Z|lang= {{{2|}}} }} }} | |{{#expr: {{#time:Y| {{{1}}} }} - 1900 }}-{{#time:m-d H:i:s| {{{1}}} }}={{date| {{#expr: {{#time:Y| {{{1}}} }} - 1900 }} | {{#ifeq: {{uc: {{{f|}}} }} | Y | |{{#time: n | {{{1}}} }}}} | {{#ifeq: {{uc: {{{f|}}} }} | Y | | {{#time: j | {{{1}}} }} }} | {{{2|}}} |form= {{{form|}}} }}{{#ifeq: {{uc: {{{f|}}} }} | Y | | {{date-time separator|{{{2|}}}}}{{Time|{{#time: H | {{{1}}} }}|{{#time: i | {{{1}}} }}|{{#time: s | {{{1}}} }}|Z|lang= {{{2|}}} }} }} |
Revision as of 21:43, 18 August 2010
[edit]
Documentation