diff --git a/app/assets/javascripts/discourse/lib/formatter.js b/app/assets/javascripts/discourse/lib/formatter.js index 9303d63b954..fd167a8ce04 100644 --- a/app/assets/javascripts/discourse/lib/formatter.js +++ b/app/assets/javascripts/discourse/lib/formatter.js @@ -92,7 +92,7 @@ Discourse.Formatter = (function(){ breakUp = cappedMemoize(breakUp, 100); shortDate = function(date){ - return moment(date).shortDate(); + return moment(date).format(I18n.t("dates.medium.date_year")); }; shortDateNoYear = function(date) { diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 6f3a6ccf7ff..d8bccf977eb 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -61,6 +61,7 @@ en: x_days: one: "1 day" other: "%{count} days" + date_year: "D MMM YYYY" medium_with_ago: x_minutes: one: "1 min ago" diff --git a/test/javascripts/lib/formatter_test.js b/test/javascripts/lib/formatter_test.js index c64d56713c1..5c93bc04e45 100644 --- a/test/javascripts/lib/formatter_test.js +++ b/test/javascripts/lib/formatter_test.js @@ -40,7 +40,7 @@ test("formating medium length dates", function() { }; var shortDateYear = function(days){ - return moment().subtract('days', days).format('D MMM, YYYY'); + return moment().subtract('days', days).format('D MMM YYYY'); }; leaveAgo = true;