<div class="registrations_box">
  <% if can? :create, Payment %>
    <div class="payment_process">
      <%= link_to "Pay Now", new_payment_path, :class => "payment_link" %>
    </div>
    <div class="prices_increase">
      Prices Increase in 
      <% rp = RegistrationPeriod.relevant_period(Date.today) %>
      <%if rp.nil?  %>
        [Unknown]
      <% else %>
        <%= distance_of_time_in_words(Date.today, rp.end_date) + " (" + ((rp.end_date) + 1).strftime("%b %e") + ")" %>
      <% end %>
    </div>
  <% end %>
</div>

<div class="registrations_box">
  <% if can? :create, Payment %>
    <div class="payment_process">
      <%= link_to "Pay Now", new_payment_path, :class => "payment_link" %>
    </div>
    <div class="prices_increase">
      Prices Increase in 
      <% rp = RegistrationPeriod.relevant_period(Date.today) %>
      <%if rp.nil?  %>
        [Unknown]
      <% else %>
        <%= distance_of_time_in_words(DateTime.now, rp.end_date) + " (" + ((rp.end_date) + 1).strftime("%b %e") + ")" %>
      <% end %>
    </div>
  <% end %>
</div>

Adjust time-remaining-in-words function to work accurately on the last day
Adjust time-remaining-in-words function to work accurately on the last day
