code: function ordinal (date) {
    var nth = parseInt(date, 10) % 100;
    if (nth > 3 && nth < 21) return date + "th";
    return date + ([ "st", "nd", "rd" ][(nth % 10) - 1] || "th");
  }
docs: #### Ordinal Numbers  You want to print the date as a ordinal number.  Create a function that convert a number to an ordinal number, then write a regular expression to match numbers in your format string that you want to ordinalize.