module Calculations
Public Instance Methods
beginning_of_semester()
click to toggle source
# File lib/semester/core_ext.rb, line 2 def beginning_of_semester first_semester_month = [7, 1].detect { |m| m <= month } beginning_of_month.change(:month => first_semester_month) end
Also aliased as: at_beginning_of_semester
end_of_semester()
click to toggle source
# File lib/semester/core_ext.rb, line 8 def end_of_semester last_semester_month = [6, 12].detect { |m| m >= month } beginning_of_month.change(:month => last_semester_month).end_of_month end
Also aliased as: at_end_of_semester
next_semester()
click to toggle source
# File lib/semester/core_ext.rb, line 19 def next_semester months_since(6) end
prev_semester()
click to toggle source
# File lib/semester/core_ext.rb, line 14 def prev_semester months_ago(6) end
Also aliased as: last_semester