Module: SprintHelper

Defined in:
app/helpers/sprint_helper.rb

Instance Method Summary collapse

Instance Method Details

#format_sprint_time_frame(sprint) ⇒ Object



3
4
5
6
7
8
9
# File 'app/helpers/sprint_helper.rb', line 3

def format_sprint_time_frame(sprint)
  if sprint.start_date.month == sprint.end_date.month
    "#{sprint.start_date.strftime("%b %-d")}–#{sprint.end_date.strftime("%-d")}".html_safe
  else
    "#{sprint.start_date.strftime("%b %-d")} – #{sprint.end_date.strftime("%b %-d")}".html_safe
  end
end