Skip to content

Commit

Permalink
Merge pull request #6562 from dmarcoux/ordinalize-dates-bootstrap
Browse files Browse the repository at this point in the history
Ordinalize the dates on the project pulse page
  • Loading branch information
Dany Marcoux committed Dec 11, 2018
2 parents fab7597 + 1658139 commit e456c72
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/api/app/helpers/webui/project_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ module Webui::ProjectHelper
protected

def pulse_period(range)
start = if range == 'month'
Time.zone.today.prev_month.strftime('%B, %e')
else
Time.zone.today.prev_week.strftime('%B, %e')
end
end_time = Time.zone.today

"#{Time.zone.today.strftime('%B, %e')}#{start}"
start_time = if range == 'month'
end_time.prev_month
else
end_time.prev_week
end

"#{start_time.strftime("%B, #{start_time.day.ordinalize} %Y")}#{end_time.strftime("%B, #{end_time.day.ordinalize} %Y")}"
end

def show_status_comment(comment, package, firstfail, comments_to_clear)
Expand Down

0 comments on commit e456c72

Please sign in to comment.