From the NannyMUD documentation

LAST CHANGE

2004-12-07

NAME

        numerical - An object handling numbers.

LOCATION

	/obj/numerical.c

FUNCTIONS

OTHER FUNCTIONS

	number_to_roman
	number_to_string
	ordinal
	ordinal_suffix

DESCRIPTION

	This object provides functions concerning numbers and offers
	ways to convert them.

FUNCTION


NAME

        number_to_roman - Converts an integer to a Roman numeral.

LOCATION

	/obj/numerical.c

SYNTAX

        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.c

SYNTAX

        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.c

SYNTAX

        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.c

SYNTAX

        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