Template:Ordinal/doc: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Amalthea
Uses safesubst: (meta:Help:Safesubst)
meta>Samwb123
new documentation
Line 1: Line 1:
<noinclude>{{Documentation subpage}}</noinclude>
{{Documentation subpage}}
 
==Usage==
:<code><nowiki>{{Ordinal|''positive integer''}}</nowiki></code>
This template will add the appropriate ordinal suffix to a given positive integer.
This template will add the appropriate ordinal suffix to a given positive integer.
:''<code><nowiki>{{Ordinal|101}}</nowiki></code>'', for example, produces ''{{Ordinal|101}}''.


For the ''-d'' suffixes used in the legal field (e.g. ''3d'' or ''22d'') set a second parameter to ''d''.
Use <code><nowiki>{{Ordinal|''positive integer''|sup=yes}}</nowiki></code> to make the ordinal suffix superscript. However do not use superscript notation in the article space, per [[Wikipedia:Manual of Style (dates and numbers)#Typography|Wikipedia:Manual of Style (dates and numbers)#Typography]].
:''<code><nowiki>{{Ordinal|101|d}}</nowiki></code>'', for example, produces ''{{Ordinal|101|d}}''.
 
For a number ending in 2 or 3 (except for numbers ending in 12 or 13), the ordinal suffix will be ''-nd'' and ''-rd'', respectively. To use -d rather than -nd and -rd, use <code><nowiki>{{Ordinal|''positive integer''|d}}</nowiki></code>.
 
==Examples==
 
{| class="wikitable" border="1"
! Code !! Result
|-
| <code><nowiki>{{Ordinal|101}}</nowiki></code> || {{Ordinal|101}}
|-
| <code><nowiki>{{Ordinal|103}}</nowiki></code> || {{Ordinal|103}}
|-
| <code><nowiki>{{Ordinal|103|d}}</nowiki></code> || {{Ordinal|103|d}}
|}
 
==Other==
*This template can be substituted.


This template can be substituted.
<includeonly>
<includeonly>
[[Category:Mathematical function templates|{{PAGENAME}}]]
[[Category:Mathematical function templates|{{PAGENAME}}]]

Revision as of 22:08, 14 July 2010

Usage

{{Ordinal|''positive integer''}}

This template will add the appropriate ordinal suffix to a given positive integer.

Use {{Ordinal|''positive integer''|sup=yes}} to make the ordinal suffix superscript. However do not use superscript notation in the article space, per Wikipedia:Manual of Style (dates and numbers)#Typography.

For a number ending in 2 or 3 (except for numbers ending in 12 or 13), the ordinal suffix will be -nd and -rd, respectively. To use -d rather than -nd and -rd, use {{Ordinal|''positive integer''|d}}.

Examples

Code Result
{{Ordinal|101}} 101st
{{Ordinal|103}} 103rd
{{Ordinal|103|d}} 103d

Other

  • This template can be substituted.