From Wikisource
Jump to navigation Jump to search
Template documentation[view] [edit] [history] [purge]



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

Use {{Ordinal|integer|sup=yes}} to display the ordinal suffix in superscript.

An integer ending in 1 (except for integers ending in 11) will have an ordinal suffix of -st. 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. To display -d for the ordinal suffixes frequently used in the legal field (e.g. 3d or 22d) rather than the default -nd or -rd, set the second parameter to d.



Code Result
{{Ordinal|101}} 101st
{{Ordinal|111}} 111th
{{Ordinal|-102}} -102nd
{{Ordinal|102|sup=yes}} 102nd
{{Ordinal|103}} 103rd
{{Ordinal|103|d}} 103d


  • This template can be substituted.

See also[edit]

  • {{cardinal}}, which removes the ordinal indicator from an ordinal number