Template:Start date: Difference between revisions
Jump to navigation
Jump to search
Created page with "<includeonly>{{#if:{{{3|}}}|{{{1}}}-{{#if:{{{2|}}}|{{padleft:{{{2}}}|2|0}}-{{padleft:{{{3}}}|2|0}}|{{padleft:{{{2}}}|2|0}}}}|{{#if:{{{2|}}}|{{{1}}}-{{padleft:{{{2}}}|2|0}}|{{{1}}}}}}}}</includeonly><noinclude> == Template:Start date == Formats a date for use in infoboxes, particularly the '''release date''' or '''start date''' field. Outputs a clean date string in YYYY-MM-DD format. === Usage === <pre>{{Start date|YYYY|MM|DD}}</pre> === Parameters === {| class="wikitab..." |
No edit summary |
||
| Line 1: | Line 1: | ||
<includeonly>{{#if:{{{3|}}}|{{{1}}}- | <includeonly>{{#if:{{{3|}}}|{{{1}}}-{{padleft:{{{2}}}|2|0}}-{{padleft:{{{3}}}|2|0}}|{{#if:{{{2|}}}|{{{1}}}-{{padleft:{{{2}}}|2|0}}|{{{1}}}}}}}</includeonly><noinclude> | ||
== Template:Start date == | == Template:Start date == | ||
Formats a date for use in infoboxes, particularly the '''release date''' or '''start date''' field. Outputs a clean date string in YYYY-MM-DD format. | Formats a date for use in infoboxes, particularly the '''release date''' or '''start date''' field. Outputs a clean date string in YYYY-MM-DD format. | ||
| Line 27: | Line 27: | ||
| <code><nowiki>{{Start date|2021}}</nowiki></code> || 2021 | | <code><nowiki>{{Start date|2021}}</nowiki></code> || 2021 | ||
|} | |} | ||
[[Category:Formatting templates]] | [[Category:Formatting templates]] | ||
[[Category:Date templates]] | [[Category:Date templates]] | ||
</noinclude> | </noinclude> | ||
Latest revision as of 19:35, 18 May 2026
Template:Start date
Formats a date for use in infoboxes, particularly the release date or start date field. Outputs a clean date string in YYYY-MM-DD format.
Usage
{{Start date|YYYY|MM|DD}}
Parameters
| Parameter | Description | Required |
|---|---|---|
{{{1}}} |
Year (four digits) | Yes |
{{{2}}} |
Month (one or two digits) | No |
{{{3}}} |
Day (one or two digits) | No |
Examples
| Input | Output |
|---|---|
{{Start date|2021|11|26}} |
2021-11-26 |
{{Start date|2021|11}} |
2021-11 |
{{Start date|2021}} |
2021 |