Template:Start date: Difference between revisions
Appearance
Created page with "<includeonly><time class="dtstart" datetime="{{#time:c|{{{1}}}-{{{2|01}}}-{{{3|01}}} {{{4|00}}}:{{{5|00}}}:{{{6|00}}} {{{7|+00:00}}}}}"> {{#if:{{{3|}}} |{{#if:{{{2|}}} |{{#time:F j, Y|{{{1}}}-{{{2}}}-{{{3}}}}} |{{#time:F Y|{{{1}}}-{{{2|01}}}-01}} }} |{{#time:Y|{{{1}}}}} }}</time></includeonly> <noinclude> == Usage == This template formats a start date in a Wikipedia-style format with a hidden ISO 8601 timestamp. === Syntax === <pre> {{Start date|year|month|da..." |
No edit summary |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
{{#if:{{{3|}}} | {{{1}}}{{#if:{{{2|}}}|-{{{2}}}{{#if:{{{3|}}}|-{{{3}}}}}}} | ||
</includeonly> | |||
<noinclude> | <noinclude> | ||
== | == Template:Start date == | ||
Simple display-only start date template. | |||
=== | === Usage === | ||
<pre> | <pre> | ||
{{Start date| | {{Start date|year|month|day}} | ||
</pre> | </pre> | ||
=== Output === | |||
{{Start date|2026|04| | * {{Start date|2026}} → 2026 | ||
* {{Start date|2026|04}} → 2026-04 | |||
→ | * {{Start date|2026|04|25}} → 2026-04-25 | ||
=== Notes === | === Notes === | ||
* | * No parser functions required | ||
* | * No extensions required | ||
* Works on all MediaWiki versions | |||
</noinclude> | </noinclude> | ||
Latest revision as of 23:39, 25 April 2026
Template:Start date
[edit]Simple display-only start date template.
Usage
[edit]{{Start date|year|month|day}}
Output
[edit]2026{{#if:|-{{{2}}}{{#if:|-{{{3}}}}}}}
→ 2026
2026{{#if:04|-04{{#if:|-{{{3}}}}}}}
→ 2026-04
2026{{#if:04|-04{{#if:25|-25}}}}
→ 2026-04-25
Notes
[edit]- No parser functions required
- No extensions required
- Works on all MediaWiki versions