Code submission for: Jordan Hudgens

Submission Status: Passed

Submitted for: January 31 - Create a Range of Months Using the Ruby Date Library

Submitted at: August 01, 2017

require 'date'

def months
  ((Date.new(2017, 01))..(Date.new(2017, 12))).each_with_object([]) do |date, month_array|
    month_array << date.strftime("%B")
  end.uniq
end

def smarter_months
  Date::MONTHNAMES[1..12]
end
Unsupported Browser

devCamp does not support ancient browsers.
Install a modern version for best experience.