I\'m sure there\'s a good simple elegant one-liner in Ruby to give you the number of days in a given month, accounting for year, such as \"February 1997\". What is it?
Time.now.end_of_month.day - for current month
Time.now.end_of_month.day
Date.parse("2014-07-01").end_of_month.day - use date of first day in month.
Date.parse("2014-07-01").end_of_month.day
Depends on ActiveSupport