Project

General

Profile

« Previous | Next » 

Revision fde12b1d

Added by Marek Hulán over 6 years ago

Fixes #19047 - unify date formats

This introduces two new helpers for printing date in absolute and
relative format. Helper for absolute accepts also a parameter to choose
between long and short variant. The long one includes the year. The date
also has a title so you see the other format after hovering mouse
cursor.

(cherry picked from commit d738d2c03a58e52b5e04d056ca259925ae71e057)

View differences:

app/views/trends/index.html.erb
</table>
<%= will_paginate_with_info @trends %>
<% unless TrendCounter.unconfigured? %>
<%= _("Last updated %s ago") % (time_ago_in_words TrendCounter.order(:created_at).last.created_at) %>
<%= (_("Last update: %s") % (date_time_relative(TrendCounter.order(:created_at).last.created_at)) ).html_safe %>
<% end %>

Also available in: Unified diff