Jump to content

Template:Start date: Difference between revisions

From Rave Wiki
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>
<includeonly>
{{#if:{{{3|}}}
{{#if:{{{3|}}}
  |{{#time:F j, Y|{{{1}}}-{{{2}}}-{{{3}}}}}
  |{{{1}}}-{{{2}}}-{{{3}}}
  |{{#if:{{{2|}}}
  |{{#if:{{{2|}}}
   |{{#time:F Y|{{{1}}}-{{{2}}}-1}}
   |{{{1}}}-{{{2}}}
   |{{{1}}}
   |{{{1}}}
   }}
   }}
Line 10: Line 10:


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


=== Syntax ===
Simple, reliable date display template.
 
=== Usage ===
<pre>
<pre>
{{Start date|year|month|day}}
{{Start date|year|month|day}}
</pre>
</pre>


=== Examples ===
=== Output rules ===
* Year only → 2026 
* Year + month → 2026-04 
* Full date → 2026-04-25 


=== Example ===
<pre>
<pre>
{{Start date|2026}}
{{Start date|2026|4|25}}
</pre>
</pre>
→ 2026
→ 2026-04-25


<pre>
<pre>
{{Start date|2026|4}}
{{Start date|2026|4}}
</pre>
</pre>
April 2026
→ 2026-04


<pre>
<pre>
{{Start date|2026|4|25}}
{{Start date|2026}}
</pre>
</pre>
April 25, 2026
→ 2026
 
=== Notes ===
* Month and day are optional.
* If only year is given, it returns year only.
* If month is given, it shows Month Year.
* If full date is given, it shows full formatted date.
</noinclude>
</noinclude>

Revision as of 23:38, 25 April 2026


Template:Start date

Simple, reliable date display template.

Usage

{{Start date|year|month|day}}

Output rules

  • Year only → 2026
  • Year + month → 2026-04
  • Full date → 2026-04-25

Example

{{Start date|2026|4|25}}

→ 2026-04-25

{{Start date|2026|4}}

→ 2026-04

{{Start date|2026}}

→ 2026