Template:Start date: Difference between revisions
Appearance
Created page with "<includeonly>{{#switch:{{#expr:{{{3|0}}} > 0}} | 1 = <!-- Y โ M โ D precision --> <time datetime="{{padleft:{{{1}}}|4|0}}-{{padleft:{{{2}}}|2|0}}-{{padleft:{{{3}}}|2|0}}"> {{#time:d F Y|{{{1}}}-{{{2}}}-{{{3}}}}} </time> | #default = <!-- Y โ M precision --> <time datetime="{{padleft:{{{1}}}|4|0}}-{{padleft:{{{2}}}|2|0}}"> {{#time:F Y|{{{1}}}-{{{2}}}-01}} </time> }}</includeonly><noinclude> == Template documentation == ;Purpose :Formats a pu..." ย |
No edit summary ย |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
< | <!-- ========================================================= | ||
ย ย Template:Start dateย โย returns an inline, non-wrapping | |||
ย ย โMonth day, Yearโ string (e.g. โDecember 12, 1991โ) | |||
============================================================= --> | |||
<includeonly><span class="nowrap">{{#time:F j, Y|{{{1}}}-{{{2|1}}}-{{{3|1}}}}}</span></includeonly><noinclude> | |||
== Usage == | |||
* `{{Start date|1991|12|12}}` โ '''December 12, 1991''' | |||
* `{{Start date|1992|10|15}}` โ '''October 15, 1992''' | |||
* You may omit the day or month: `{{Start date|1993|05}}` โ '''May 1993''' | |||
The template purposely contains **no leading / trailing spaces** or newlines so it can be | |||
embedded inside tables (e.g. infobox cells) without triggering unwanted | |||
paragraph (`<p>`) or preformatted (`<pre>`) blocks. | |||
* * | |||
ย | |||
< | |||
ย | |||
ย | |||
ย | |||
The `nowrap` class (MediaWiki core) keeps the entire date on a single | |||
line, avoiding ugly breaks inside infoboxes.ย | |||
</noinclude> | </noinclude> | ||
Latest revision as of 12:17, 27 April 2025
Usage
[edit source]- `
December 12, 1991` โ December 12, 1991
- `
October 15, 1992` โ October 15, 1992
- You may omit the day or month: `
May 1, 1993` โ May 1993
The template purposely contains **no leading / trailing spaces** or newlines so it can be embedded inside tables (e.g. infobox cells) without triggering unwanted
paragraph (`
`) or preformatted (`
`) blocks. The `nowrap` class (MediaWiki core) keeps the entire date on a single line, avoiding ugly breaks inside infoboxes.