Difference between revisions of "Template:Start date and age"
From Ava Zinn Wiki
[unchecked revision] | [unchecked revision] |
(Save changed the way "df" parameter is handled) |
Aeverinezinn (talk | contribs) m (101 revisions) |
||
(45 intermediate revisions by 22 users not shown) | |||
Line 1: | Line 1: | ||
− | + | <includeonly><!-- | |
− | |||
− | |||
− | |||
IMPLEMENTATION OF DATE | IMPLEMENTATION OF DATE | ||
− | |||
-->{{#if: {{{1|}}}<!-- | -->{{#if: {{{1|}}}<!-- | ||
-->|{{#if: {{{2|}}}<!-- | -->|{{#if: {{{2|}}}<!-- | ||
-->|{{#if: {{{3|}}}<!-- | -->|{{#if: {{{3|}}}<!-- | ||
− | -->|{{#ifeq: {{{df|}}}|yes<!-- | + | -->|{{#ifeq:{{yesno|{{{df|no}}}}}|yes<!-- |
− | -->|{{#expr:{{{3}}}}} {{MONTHNAME|{{{2}}}}}<!-- | + | -->|{{#expr:{{{3}}}}} {{MONTHNAME|{{{2}}}}}<!-- |
− | -->|{{MONTHNAME|{{{2}}}}} {{#expr:{{{3}}}}},<!-- | + | -->|{{MONTHNAME|{{{2}}}}} {{#expr:{{{3}}}}},<!-- |
− | + | -->}} {{{1}}}<!-- | |
− | -->|{{MONTHNAME|{{{2}}}}} {{{1}}}<!-- | + | -->|{{MONTHNAME|{{{2}}}}} {{{1}}}<!-- |
− | + | -->}}<!-- | |
-->|{{{1}}}<!-- | -->|{{{1}}}<!-- | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
-->}}<!-- | -->}}<!-- | ||
− | + | --><span class="noprint">{{#ifeq:{{yesno|{{{paren|{{{p|no}}}}}}}}|yes||;}}<!-- | |
− | -->|'''{{color|red|Error: | + | -->{{#ifeq:{{yesno|{{{br|no}}}}}|yes|<br/>| }}<!-- |
+ | -->{{#ifeq:{{yesno|{{{paren|{{{p|no}}}}}}}}|yes|(}}<!-- | ||
+ | -->{{#if: {{{2|}}}<!-- | ||
+ | -->|{{#if: {{{3|}}}<!-- | ||
+ | -->|{{time ago|{{{1}}}-{{{2}}}-{{{3}}}|min_magnitude=days}}<!-- | ||
+ | -->|{{years or months ago|{{{1}}}|{{#time:n|1-{{{2}}}-1}}}}<!-- | ||
+ | -->}}<!-- | ||
+ | -->|{{#iferror:{{#expr:{{{1}}}}}<!-- | ||
+ | -->|{{time ago|{{{1}}}|min_magnitude=days}}<!-- | ||
+ | -->|{{years or months ago|{{{1}}}}}<!-- | ||
+ | -->}}<!-- | ||
+ | -->}}<!-- | ||
+ | -->{{#ifeq:{{yesno|{{{paren|{{{p|no}}}}}}}}|yes|)}}</span><!-- | ||
+ | -->|'''{{color|red|Error: first parameter is missing.}}'''<!-- | ||
-->}}<!-- | -->}}<!-- | ||
+ | IMPLEMENTATION OF microformat date classes | ||
− | + | --><span style="display:none"> (<span class="{{#ifeq:{{yesno|{{{end|no}}}}}|yes|dtend|bday dtstart published updated}}"><!-- | |
− | |||
− | |||
− | --><span style="display:none"> (<span class="bday dtstart updated"><!-- | ||
-->{{#if: {{{1|}}}<!-- | -->{{#if: {{{1|}}}<!-- | ||
-->|{{{1}}}<!-- | -->|{{{1}}}<!-- | ||
-->{{#if: {{{2|}}}<!-- | -->{{#if: {{{2|}}}<!-- | ||
− | -->| -{{ | + | -->| -{{#time:m|1-{{{2}}}-1}}<!-- |
− | + | -->{{#if: {{{3|}}}<!-- | |
− | + | -->| -{{padleft:{{{3}}}|2|0}}<!-- | |
− | + | -->}}<!-- | |
− | + | -->}}<!-- | |
− | -->}}<!-- | + | -->}}<!-- |
--></span>)</span></includeonly><noinclude> | --></span>)</span></includeonly><noinclude> | ||
− | |||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> |
Latest revision as of 04:41, 3 February 2016
Template documentation[create]
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |