summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-02-10 17:12:18 +0000
committerPhil Hughes <me@iamphill.com>2017-02-10 17:14:52 +0000
commit8aa757aa532c14445aca8731b7a553e657a58593 (patch)
tree8a5fc804eaa7b65edb2fdcdba67e41b2a6fa1293
parent22fd68ab702d0c6727af4be3e24bc2559f3dffc3 (diff)
downloadgitlab-ce-8aa757aa532c14445aca8731b7a553e657a58593.tar.gz
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
-rw-r--r--app/helpers/application_helper.rb2
-rw-r--r--changelogs/unreleased/format-timeago-date.yml4
2 files changed, 5 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index bee323993a0..724641fd9d8 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -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,
diff --git a/changelogs/unreleased/format-timeago-date.yml b/changelogs/unreleased/format-timeago-date.yml
new file mode 100644
index 00000000000..f331c34abbc
--- /dev/null
+++ b/changelogs/unreleased/format-timeago-date.yml
@@ -0,0 +1,4 @@
+---
+title: Format timeago date to short format
+merge_request:
+author: