Template:Ordinal/doc: Difference between revisions
Template page
More actions
No edit summary |
No edit summary |
||
| Line 20: | Line 20: | ||
|4stat=optional- | |4stat=optional- | ||
|name=Ordinal | |name=Ordinal | ||
|desc=This template will add the appropriate ordinal suffix to a given | |desc=This template will add the appropriate ordinal suffix to a given integer. | ||
:''<code><nowiki>{{Ordinal|101}}</nowiki></code>'', for example, produces ''{{Ordinal|101}}''. | :''<code><nowiki>{{Ordinal|101}}</nowiki></code>'', for example, produces ''{{Ordinal|101}}''. | ||
In English version, for an integer ending in 2 or 3 (except for integers ending in 12 or 13), the ordinal suffix will be -nd and -rd, respectively. | |||
|namespace=all | |namespace=all | ||
|usergroup=all | |usergroup=all | ||
| Line 37: | Line 39: | ||
|relieson= | |relieson= | ||
}} | }} | ||
==Examples== | |||
{| class="wikitable" border="1" | |||
! Code !! Result | |||
|- | |||
| <code><nowiki>{{Ordinal|101}}</nowiki></code> || {{Ordinal|101}} | |||
|- | |||
| <code><nowiki>{{Ordinal|-102}}</nowiki></code> || {{Ordinal|-102}} | |||
|- | |||
| <code><nowiki>{{Ordinal|102}}</nowiki></code> || {{Ordinal|102}} | |||
|- | |||
| <code><nowiki>{{Ordinal|103}}</nowiki></code> || {{Ordinal|103}} | |||
|- | |||
| <code><nowiki>{{Ordinal|103|d}}</nowiki></code> || {{Ordinal|103|d}} | |||
|} | |||
<includeonly> | <includeonly> | ||
[[Category:Mathematical function templates|{{PAGENAME}}]] | [[Category:Mathematical function templates|{{PAGENAME}}]] | ||
[[eo:Ŝablono:Ordinara]] | |||
[[ia:Patrono:Ordinal]] | [[ia:Patrono:Ordinal]] | ||
[[ro:Format:Ordinal]] | [[ro:Format:Ordinal]] | ||
[[en:Template:Ordinal]] | |||
</includeonly> | </includeonly> | ||
Revision as of 20:14, 21 April 2011
This template will add the appropriate ordinal suffix to a given integer.
{{Ordinal|101}}, for example, produces 101st.
In English version, for an integer ending in 2 or 3 (except for integers ending in 12 or 13), the ordinal suffix will be -nd and -rd, respectively.
Usage
{{Ordinal |1= }}
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
1 | positive integer number | empty | optional | |
style | Presentation style. Different options for different languages:
| empty | optional | |
gender | gender is used in French and Polish language versions. Genders: m for male, f for female and n for neuter. | m | optional | |
lang | language | {{int:Lang}} | optional | |
Additional information
The template is intended to be used in the following namespaces: all namespaces
The template is intended to be used by the following user groups: all users
Examples
| Code | Result |
|---|---|
{{Ordinal|101}} |
101st |
{{Ordinal|-102}} |
-102 |
{{Ordinal|102}} |
102nd |
{{Ordinal|103}} |
103rd |
{{Ordinal|103|d}} |
103rd |