Commit 8aa757aa authored by Phil Hughes's avatar Phil Hughes

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
parent 22fd68ab
......@@ -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,
......
---
title: Format timeago date to short format
merge_request:
author:
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment