Jump to content

Template:Start date: Difference between revisions

From RetroTechCollection
No edit summary
No edit summary
ย 
Line 1: Line 1:
<!-- =========================================================
<!-- =========================================================
Template:Start date ย  ยทย  ultra-simple inline version
ย  ย  Template:Start date โ€”ย  returns an inline, non-wrapping
========================================================= -->
ย  ย  โ€œMonth day, Yearโ€ string (e.g. โ€œDecember 12, 1991โ€)
<includeonly>{{#time:F j, Y|{{{1}}}-{{{2|1}}}-{{{3|1}}}}}</includeonly>
============================================================= -->
<noinclude>
<includeonly><span class="nowrap">{{#time:F j, Y|{{{1}}}-{{{2|1}}}-{{{3|1}}}}}</span></includeonly><noinclude>
== Usage ==
== Usage ==
<syntaxhighlight lang="text">
* `{{Start date|1991|12|12}}` โ†’ '''December 12, 1991'''
{{Start date|YYYY|MM|DD}}
* `{{Start date|1992|10|15}}` โ†’ '''October 15, 1992'''
</syntaxhighlight>
* You may omit the day or month: `{{Start date|1993|05}}` โ†’ '''May 1993'''
Only the year is required.ย  Month and day default to โ€œ1โ€.


=== Examples ===
The template purposely contains **no leading / trailing spaces** or newlines so it can be
* <nowiki>{{Start date|1991|12|12}}</nowiki> โ†’ {{Start date|1991|12|12}}
embedded inside tables (e.g. infobox cells) without triggering unwanted
* <nowiki>{{Start date|1992|10}}</nowiki>ย  โ†’ {{Start date|1992|10}}
paragraph (`<p>`) or preformatted (`<pre>`) blocks.
* <nowiki>{{Start date|1993}}</nowiki> ย  ย  โ†’ {{Start date|1993}}


[[Category:Date formatting templates]]
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


  • `

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.