More actions
m Add TemplateData |
m Leave note for myself |
||
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> | ||
<!-- https://www.wikifunctions.org/view/en/Z14531 --> | |||
Simply adds the correct suffix to a number to indicate it is an ordinal, for example <code><nowiki>{{ordinal|3}}</nowiki></code> ⟶ {{ordinal|3}}, and <code><nowiki>{{ordinal|11}}</nowiki></code> ⟶ {{ordinal|11}}. | Simply adds the correct suffix to a number to indicate it is an ordinal, for example <code><nowiki>{{ordinal|3}}</nowiki></code> ⟶ {{ordinal|3}}, and <code><nowiki>{{ordinal|11}}</nowiki></code> ⟶ {{ordinal|11}}. |
Latest revision as of 17:24, 3 January 2025
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".
Parameter | Description | Type | Status | |
---|---|---|---|---|
Number | 1 | no description | Number | optional |