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

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

Instance Method Summary collapse

Instance Method Details

#beginning_of_period(date) ⇒ Object



229
230
231
# File 'lib/sof/cycle/time_span.rb', line 229

def beginning_of_period(date)
  date.beginning_of_quarter
end

#durationObject



221
222
223
# File 'lib/sof/cycle/time_span.rb', line 221

def duration
  (count * 3).months
end

#end_of_period(date) ⇒ Object



225
226
227
# File 'lib/sof/cycle/time_span.rb', line 225

def end_of_period(date)
  date.end_of_quarter
end