The first video in the TASBot Re: (TASBot Revisited) series is out! TASBot Re: Gradius covers our first run from AGDQ 2014.

Historians wanted: Inquire here.

Template:Ordinal: Difference between revisions

Template page
(Import from en.Wikipedia.org)
 
m (Add TemplateData)
 
Line 1: Line 1:
<onlyinclude><includeonly>{{{1}}}<sup>{{#switch:{{#expr:abs({{{1}}}) mod 100}}|11|12|13=th|{{#switch:{{#expr:abs{{{1}}} mod 10}}|1=st|2=nd|3=rd|th}}}}</sup></includeonly></onlyinclude>
<onlyinclude><includeonly>{{{1}}}<sup>{{#switch:{{#expr:abs({{{1}}}) mod 100}}|11|12|13=th|{{#switch:{{#expr:abs{{{1}}} mod 10}}|1=st|2=nd|3=rd|th}}}}</sup></includeonly></onlyinclude>
Simply adds the correct suffix to a number to indicate it is an ordinal, for example <code><nowiki>{{ordinal|3}}</nowiki></code> &longrightarrow; {{ordinal|3}}, and <code><nowiki>{{ordinal|11}}</nowiki></code> &longrightarrow; {{ordinal|11}}.
Simply adds the correct suffix to a number to indicate it is an ordinal, for example <code><nowiki>{{ordinal|3}}</nowiki></code> &longrightarrow; {{ordinal|3}}, and <code><nowiki>{{ordinal|11}}</nowiki></code> &longrightarrow; {{ordinal|11}}.
{{TemplateData preamble}}<templatedata>
{
"params": {
"1": {
"label": "Number",
"type": "number"
}
},
"description": "Adds the correct English ordinal suffix to a number e.g. \"3\" to \"3rd\".",
"format": "inline"
}
</templatedata>

Latest revision as of 18:49, 30 October 2023


Simply adds the correct suffix to a number to indicate it is an ordinal, for example {{ordinal|3}} ⟶ 3rd, and {{ordinal|11}} ⟶ 11th.


The below documentation is automatically generated from JSON.

It can be changed by editing this page, but note that it's only the documentation (for the visual editor)—the actual template part must also be edited, manually.

Adds the correct English ordinal suffix to a number e.g. "3" to "3rd".

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Number1

no description

Numberoptional