From the NannyMUD documentation
2004-12-07
numerical - An object handling numbers.
/obj/numerical.c
number_to_roman number_to_string ordinal ordinal_suffix
This object provides functions concerning numbers and offers ways to convert them.
NAME
number_to_roman - Converts an integer to a Roman numeral.LOCATION
/obj/numerical.cSYNTAX
string number_to_roman(int number)DESCRIPTION
This function returns the Roman numeral for the given number.
FUNCTION
NAME
number_to_string - Converts an integer to the numerical word.LOCATION
/obj/numerical.cSYNTAX
number_to_string(int number)DESCRIPTION
This function returns the numerical word for the given number.
FUNCTION
NAME
ordinal - Converts something to an ordinal number.LOCATION
/obj/numerical.cSYNTAX
string ordinal(mixed number) string ordinal(mixed number, int short_flag)DESCRIPTION
This function returns the English ordinal word for the number. If the short_flag is used, it will keep the number and simply append the suffix to the number.EXAMPLE
ordinal(11) returns "eleventh" ordinal(3) returns "third" ordinal(45, 1) returns "45th" ordinal("five") returns "fifth" ordinal("one", 1) returns "first" (Yes, flag is ignored for strings) ordinal("x") returns "xth"
FUNCTION
NAME
ordinal_suffix - The suffix to place after the number.LOCATION
/obj/numerical.cSYNTAX
string ordinal_suffix(int number)DESCRIPTION
This function returns the appropriate suffix for the given number.RETURN VALUES
"st", "nd", "rd" or "th".NOTE
You probably want to use ordinal(number, 1) instead, which appends the suffix to the number automatically