class Date

Public Instance Methods

beginning_of_month() click to toggle source
# File lib/always_be_contributing/core_ext/date/month_calculator.rb, line 2
def beginning_of_month
  change(day: 1)
end
change(options) click to toggle source
# File lib/always_be_contributing/core_ext/date/month_calculator.rb, line 5
def change(options)
  ::Date.new(
    options.fetch(:year, year),
    options.fetch(:month, month),
    options.fetch(:day, day)
  )
end