JadedEvan
7/21/2010 - 11:13 PM

Date ordinal

class Numeric
  def ordinal
    self.to_s + ( (10...20).include?(self) ? 'th' : %w{ th st nd rd th th th th th th }[self % 10] )
  end
end