Template:Ordinal

From RationalWiki
Jump to navigation Jump to search

{{{1}}}th

[edit] [purge] Documentation

Works out whether a number is st, nd, rd or th; and displays that. Works with negative numbers too.

Usage

First parameter is the number.

Second can be set to "d" to make the suffix "d" rather than anything else, for some reason.

Set parameter "sup" to "yes" to make the suffix superscript.

Examples:

{{ordinal|20}} 20th
{{ordinal|21}} 21st
{{ordinal|22}} 22nd
{{ordinal|23}} 23rd
{{ordinal|22|sup=yes}} 22nd
{{ordinal|22|d}} 22d

See also