Difference between revisions of "Template:Date"

From SGUTranscripts
Jump to navigation Jump to search
(trying out a new shortcut)
 
m (tiny fix)
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
+
<includeonly>{{#switch: {{{1}}}
{{#switch: date
+
  | 1 = 1<sup>st</sup>
  | 1 =  
+
  | 21 = 21<sup>st</sup>
  | 21 =  
+
  | 31 = 31<sup>st</sup>
  | 31 = {{date}}<sup>st</sup>
+
  | 2 = 2<sup>nd</sup>
  | 2 =  
+
  | 22 = 22<sup>nd</sup>  
  | 22 = {{date}}<sup>nd</sup>  
+
  | 3 = 3<sup>rd</sup>
  | 3 =  
+
  | 23 = 23<sup>rd</sup>
  | 23 = {{date}}<sup>rd</sup>
+
  | D = DD<sup>th</sup>
  | 4 =
+
  | #default = {{{1}}}<sup>th</sup>}}</includeonly><noinclude>
  | #default = {{date}}<sup>th</th>
 
}}
 
 
 
</includeonly><noinclude>
 
 
=== Description ===
 
=== Description ===
 
+
This template inserts the appropriate two-letter superscript text for the ordinal abbreviation of the date of the month.
  
 
=== Usage ===
 
=== Usage ===
To use this template, place <nowiki>{{date|##}}</nowiki> in an entry where "##" is the number for the day of the month.
+
To use this template, place <nowiki>{{date|##}}</nowiki> in the Infobox line for "episode date", where "##" is the number for the day of the month.
  
 
For example,
 
For example,
  
  S: Our guest tonight is <nowiki>{{w|James Randi}}</nowiki>.
+
  February <nowiki>{{date|22}}</nowiki> 2022.
  
 
will produce
 
will produce
  
:S: Our guest tonight is {{w|James Randi}}''.
+
February {{date|22}} 2022.
 
+
[[Category:Templates]]
 
 
 
</noinclude>
 
</noinclude>

Latest revision as of 05:53, 28 February 2022

Description

This template inserts the appropriate two-letter superscript text for the ordinal abbreviation of the date of the month.

Usage

To use this template, place {{date|##}} in the Infobox line for "episode date", where "##" is the number for the day of the month.

For example,

February {{date|22}} 2022.

will produce

February 22nd 2022.