module Periods::Modules::Quarter::InstanceMethods
Public Instance Methods
months()
click to toggle source
# File lib/periods/modules/quarter.rb, line 18 def months [ Periods::Month.for(start_date), Periods::Month.for(start_date.next_month), Periods::Month.for(start_date.next_month(2)) ] end
Private Instance Methods
beginning_of_month(date)
click to toggle source
# File lib/periods/modules/quarter.rb, line 29 def beginning_of_month(date) Periods::DateCalculator.new(date).beginning_of_month end
end_of_month(date)
click to toggle source
# File lib/periods/modules/quarter.rb, line 33 def end_of_month(date) Periods::DateCalculator.new(date).end_of_month end
init_with_date(date)
click to toggle source
# File lib/periods/modules/quarter.rb, line 25 def init_with_date(date) init_with_dates(beginning_of_month(date), end_of_month(date.next_month(2))) end