lib/by_star/by_month.rb
# For reasoning why I use *args rather than variables here,
# please see the by_year method comments in lib/by_star/by_year.rb
For reasoning why I use *args rather than variables here,
please see the by_year method comments in lib/by_star/by_year.rb
For reasoning why I use * args rather than variables here please see the by_year method comments in lib / by_star / by_year . rb
def by_month_String_or_Fixnum(month, options={})
      if valid_month?(month)
        year = options[:year] || Time.zone.now.year
        by_month_Time("#{year}-#{month}-01".to_time.in_time_zone(Time.zone), options)
      else
        raise ParseError, "Month must be a number between 1 and 12 or the full month name (e.g. 'January', 'Feburary', etc.)"
      end
    end
def by_month_String_or_Fixnum ( month , options = { } ) if valid_month? ( month ) year = options [ :year ] || Time . zone . now . year by_month_Time ( "#{year}-#{month}-01" . to_time . in_time_zone ( Time . zone ) , options ) else raise ParseError , "Month must be a number between 1 and 12 or the full month name (e.g. 'January', 'Feburary', etc.)" end end
For reasoning why I use *args rather than variables here,
please see the by_year method comments in lib/by_star/by_year.rb
For reasoning why I use * args rather than variables here please see the by_year method comments in lib / by_star / by_year . rb
month
<not_specific>
options
<not_specific>