public class Num {
    //This class has stuff to do with
    //Numbers such as date, ordinalization,
    //etc.

    public static final String[] MONTHS = {
        null,
        "January", "Febuary", "March", "April",
        "May", "June", "July", "August",
        "September", "October", "November", "December"
    };

    /**
     *Ordinalizes a number
     *EX: 1 => 1st
     *31 => 31st
     *49 => 49th
     *
     */
    public String  ordinalize(int x){
        int y = x%10;
        String end = {"th","st","nd","rd","th","th","th","th","th","th","th"};
        return String.valueOf(x)+end[y];
    }

    /**
     * Creates a human readable date out of the month, day, and year numbers.
     *
     * <pre>
     * {@code
     * Num.dateString(3, 4, 2012)   // =&gt; "March 4th, 2012"
     * Num.dateString(12, 1, 2012)  // =&gt; "December 1st, 2012"
     * }
     * </pre>
     *
     * @param month the number of the month
     * @param day the day of the month
     * @param year the year
     * @return a human readable date formed from the number inputs
     */
    public static String dateString(int month, int day, int year) {
        return String.format(
            "%s %s, %d",
            MONTHS[month],
            ordinalize(day),
            year
        );
    }
}

@@ -334,105 +334,453 @@
    *
-Ordinalizes a numb
+ Returns a string with the ordinal form of an integ
 er
+.
 %0A     *
-EX: 1 =%3E 
+%0A     * %3Cpre%3E%0A     * %7B@code%0A     * Num.ordinalize(1)   // =&gt; %22
 1st
+%22
 %0A     *
-31 =%3E 31st%0A     *49 =%3E 49
+ Num.ordinalize(5)   // =&gt; %225th%22%0A     * Num.ordinalize(12)  // =&gt; %2212th%22%0A     * Num.ordinalize(42)  // =&gt; %2242nd%22%0A     * Num.ordinalize(44)  // =&gt; %2244
 th
+%22
 %0A     *
+ %7D
 %0A     *
-/%0A    publ
+ %3C/pre%3E%0A     *%0A     * @param n the number to be ordinalized%0A     * @return the ordinal form of %7B@code n%7D%0A     */%0A    public stat
 ic S
@@ -785,17 +785,16 @@
  String 
- 
 ordinali
@@ -800,18 +800,19 @@
 ize(int 
-x)
+n) 
 %7B%0A      
@@ -821,26 +821,42 @@
 int 
-y = x%25
+last = Math.abs(n %25 
 10
+)
 ;%0A
+%0A
         
 Stri
@@ -855,78 +855,167 @@
     
-String end = %7B%22th%22,%22st%22,%22nd%22,%22rd%22,%22th%22,%22th%22,%22th%22,%22th%22,%22th%22,%22th%22,
+// If the ones place is 1 through 3, but the tens place isn't 1 (we%0A        // still want 11-13 to get %22th%22), use st/nd/rd. Anything else gets%0A        // 
 %22th%22
-%7D;
+.
 %0A   
@@ -1030,32 +1030,166 @@
 urn 
-String.valueOf(x)+end%5By%5D
+n + (%0A            Math.abs(n %25 100) / 10 != 1 && last %3E= 1 && last %3C= 3%0A            ? new String%5B%5D %7Bnull, %22st%22, %22nd%22, %22rd%22%7D%5Blast%5D%0A            : %22th%22%0A        )
 ;%0A  

Improve Num.ordinalize()