以下是一些输出:
Date.today => Mon, 25 Jun 2012
Date.today.to_formatted_s(:long_ordinal) => "June 25th, 2012"
Date.today.strftime('%A %d, %B') => "Monday 25, June"
现在我需要以下格式的输出,即:
Monday 25th, June or Thrusday, 1st, October
问题是to_formatted_s和strftime仅适用于日期并且两者或它们都返回字符串。如何以我需要的方式获得输出?