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 |
||
| Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
{{#if:{{{ | {{#ifeq:{{{3|}}}|| | ||
{{#if:{{{2|}}}|| | |||
{{#time:F Y|{{{1}}}-{{{2|1}}}-1}} | |||
| | |||
{{#time:F j, Y|{{{1}}}-{{{2}}}-{{{3}}}}} | |||
}} | }} | ||
| | |||
}} | {{#time:Y|{{{1}}}}} | ||
}} | |||
</includeonly> | |||
<noinclude> | <noinclude> | ||
== | == Template:Start date == | ||
=== | Formats a start date in a Wikipedia-style human-readable form. | ||
=== Usage === | |||
<pre> | <pre> | ||
{{Start date|year|month|day | {{Start date|year|month|day}} | ||
</pre> | </pre> | ||
=== | === Examples === | ||
<pre> | |||
{{Start date|2026}} | |||
</pre> | |||
→ 2026 | |||
<pre> | <pre> | ||
{{Start date|2026| | {{Start date|2026|4}} | ||
</pre> | </pre> | ||
→ April | → April 2026 | ||
<pre> | <pre> | ||
{{Start date|2026| | {{Start date|2026|4|25}} | ||
</pre> | </pre> | ||
→ April 25, 2026 | → April 25, 2026 | ||
=== Notes === | === Notes === | ||
* | * Month and day are optional. | ||
* | * Designed for clean display (no broken ISO or time complexity). | ||
</noinclude> | </noinclude> | ||
Revision as of 23:33, 25 April 2026
Template:Start date
Formats a start date in a Wikipedia-style human-readable form.
Usage
{{Start date|year|month|day}}
Examples
{{Start date|2026}}
→ 2026
{{Start date|2026|4}}
→ April 2026
{{Start date|2026|4|25}}
→ April 25, 2026
Notes
- Month and day are optional.
- Designed for clean display (no broken ISO or time complexity).