Jump to content

Template:Start date: Difference between revisions

From Rave Wiki
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly>
<includeonly>
{{#if:{{{3|}}}
{{{1}}}{{#if:{{{2|}}}|-{{{2}}}{{#if:{{{3|}}}|-{{{3}}}}}}}
|{{#time:F j, Y|{{{1}}}-{{{2}}}-{{{3}}}}}
|{{#if:{{{2|}}}
  |{{#time:F Y|{{{1}}}-{{{2}}}-1}}
  |{{{1}}}
  }}
}}
</includeonly>
</includeonly>


<noinclude>
<noinclude>
== Usage ==
== Template:Start date ==
Displays a formatted start date.


=== Syntax ===
Simple display-only start date template.
 
=== Usage ===
<pre>
<pre>
{{Start date|year|month|day}}
{{Start date|year|month|day}}
</pre>
</pre>


=== Examples ===
=== Output ===
 
* {{Start date|2026}} → 2026
<pre>
* {{Start date|2026|04}} → 2026-04 
{{Start date|2026}}
* {{Start date|2026|04|25}} → 2026-04-25
</pre>
→ 2026
 
<pre>
{{Start date|2026|4}}
</pre>
April 2026
 
<pre>
{{Start date|2026|4|25}}
</pre>
April 25, 2026


=== Notes ===
=== Notes ===
* Month and day are optional.
* No parser functions required
* If only year is given, it returns year only.
* No extensions required
* If month is given, it shows Month Year.
* Works on all MediaWiki versions
* If full date is given, it shows full formatted date.
</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