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/helpers/fact_values_helper.rb
module FactValuesHelper
def fact_from(record)
_("%s ago") % time_ago_in_words(record.updated_at)
date_time_relative(record.updated_at)
rescue
_("N/A")
end

Also available in: Unified diff