functx:ordinal-number-en
Reformats a number as an ordinal number, e.g. 1st, 2nd, 3rd.
Description
The functx:ordinal-number-en function returns the corresponding ordinal number (in English) of $num. For example, if $num is 245, it will return “245th”.
The $num argument must have the type xs:integer(or an untyped value that can be cast to xs:integer), or an error is raised.
Parameters |
Description |
---|---|
num:integer() |
the number |
Examples
XPath |
Results |
---|---|
functx:ordinal-number-en(1) |
1st |
functx:ordinal-number-en(12) |
12th |