core/src/main/java/com/twitter/elephantbird/util/Strings.java
public static String ordinalize(int n) {
    int mod100 = n % 100;
    if (mod100 == 11 || mod100 == 12 || mod100 == 13) {
      return String.valueOf(n) + "th";
    }
    switch (n % 10) {
      case 1:
        return String.valueOf(n) + "st";
      case 2:
        return String.valueOf(n) + "nd";
      case 3:
        return String.valueOf(n) + "rd";
      default:
        return String.valueOf(n) + "th";
    }
  }
public static String ordinalize(int n) {
    int mod100 = n % 100;
    if (mod100 == 11 || mod100 == 12 || mod100 == 13) {
      return String.valueOf(n) + "th";
    }
    switch (n % 10) {
      case 1:
        return String.valueOf(n) + "st";
      case 2:
        return String.valueOf(n) + "nd";
      case 3:
        return String.valueOf(n) + "rd";
      default:
        return String.valueOf(n) + "th";
    }
  }
Return the ordinal for the given number.
@param n The number
@return The ordinal String