lib/frequency_calculation.rb
# Returns an end_date, the date to stop calculating until.
Returns an end_date, the date to stop calculating until.
Returns an end_date the date to stop calculating until .
def calculate_end_date(start_date, end_date)
    end_date_from_start_date = start_date + 3.years
    return end_date_from_start_date if end_date.nil?
    end_date < end_date_from_start_date ? end_date : end_date_from_start_date
  end
def calculate_end_date ( start_date , end_date ) end_date_from_start_date = start_date + 3 . years return end_date_from_start_date if end_date . nil? end_date < end_date_from_start_date ? end_date : end_date_from_start_date end
Returns an end_date, the date to stop calculating until.
Returns an end_date the date to stop calculating until .
start_date
<not_specific>
end_date
<not_specific>