Template:Ordinal

From Ultima Codex
Jump to navigation Jump to search

Appends a ordinal suffix on a given input number

Parameters[edit]

The first parameter can be any string, as long as it ends with 1 or 2 digits it will assumed to be a number and converted to an ordinal.

Examples[edit]

Code Output Notes
{{ordinal}} null input
{{ordinal|abc}} abc non-numeric input
{{ordinal|0}} 0th
{{ordinal|1}} 1st
{{ordinal|2}} 2nd
{{ordinal|3}} 3rd
{{ordinal|4}} 4th
{{ordinal|5}} 5th
{{ordinal|6}} 6th
{{ordinal|7}} 7th
{{ordinal|8}} 8th
{{ordinal|9}} 9th
{{ordinal|10}} 10th
{{ordinal|11}} 11th
{{ordinal|12}} 12th
{{ordinal|13}} 13th
{{ordinal|20}} 20th
{{ordinal|21}} 21st
{{ordinal|22}} 22nd
{{ordinal|23}} 23rd
{{ordinal|24}} 24th

See Also[edit]