Skip to content
This repository has been archived by the owner on Sep 10, 2023. It is now read-only.

Commit

Permalink
Fix event time distance
Browse files Browse the repository at this point in the history
  • Loading branch information
EricPickup committed May 9, 2019
1 parent e8170dc commit acc3539
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/views/events/show.html.erb
Expand Up @@ -3,7 +3,11 @@
<h5 class="card-title"><%= @event.title %></h5>
<h6 class="card-subtitle mb-2 text-muted">
<%= @event.start_date.strftime('%A, %B %d, %Y from %l:%M%P') %> - <%= @event.end_time.strftime('%l:%M%P') %>
(in <%= distance_of_time_in_words(Time.now, @event.start_date) %>)
<% if @event.start_date.future? %>
(in <%= distance_of_time_in_words(Time.now, @event.start_date) %>)
<% else %>
(<%= distance_of_time_in_words(Time.now, @event.start_date) %> ago)
<% end %>
</h6>
<% if @event.registration_enabled %>
<br>
Expand Down

0 comments on commit acc3539

Please sign in to comment.