Formats timeago dates to be more friendly

Formats the timeago timestamps to be a short date. This will only be
visible on slower connections whilst the JS is loading, after the
JS has loaded it will be turned into a timeago string

Closes #27537
This commit is contained in:
Phil Hughes 2017-02-10 17:12:18 +00:00
parent 22fd68ab70
commit 8aa757aa53
2 changed files with 5 additions and 1 deletions

View file

@ -166,7 +166,7 @@ module ApplicationHelper
css_classes = short_format ? 'js-short-timeago' : 'js-timeago'
css_classes << " #{html_class}" unless html_class.blank?
element = content_tag :time, time.to_s,
element = content_tag :time, time.strftime("%b %d, %Y"),
class: css_classes,
title: time.to_time.in_time_zone.to_s(:medium),
datetime: time.to_time.getutc.iso8601,

View file

@ -0,0 +1,4 @@
---
title: Format timeago date to short format
merge_request:
author: