Class: SOF::TimeSpan::DatePeriod::Quarter

Inherits:
SOF::TimeSpan::DatePeriod
  • Object
show all
Defined in:
lib/sof/time_span.rb

Instance Method Summary collapse

Instance Method Details

#beginning_of_period(date) ⇒ Object



143
144
145
# File 'lib/sof/time_span.rb', line 143

def beginning_of_period(date)
  date.beginning_of_quarter
end

#durationObject



135
136
137
# File 'lib/sof/time_span.rb', line 135

def duration
  (count * 3).months
end

#end_of_period(date) ⇒ Object



139
140
141
# File 'lib/sof/time_span.rb', line 139

def end_of_period(date)
  date.end_of_quarter
end