-- vim: set noexpandtab ft=lua ts=4 sw=4:require('strict')
local o = local debug = false
--makeOrdinal|target_num|}}
Parameters 1: The string whose length to report 2: the language code
If invoked using named parameters, Mediawiki will automatically remove any leading ortrailing whitespace from the target string.
function o.makeOrdinal(target_num, langcode) if langcode1 then return target_num .. 'er' else return target_num .. 'e' end elseif langcode
11 or target_num
13 then return target_num .. 'th' elseif target_num % 10
2 then return target_num .. 'nd' elseif target_num % 10
return o