From 05c479bafd88810399d82d88859d040b035a7d86 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Mon, 11 Sep 2017 17:56:27 +0200 Subject: parse date in fromNow helper --- server/sonar-web/src/main/js/helpers/handlebars/fromNow.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server/sonar-web/src') diff --git a/server/sonar-web/src/main/js/helpers/handlebars/fromNow.js b/server/sonar-web/src/main/js/helpers/handlebars/fromNow.js index c17513de218..590a1dd113d 100644 --- a/server/sonar-web/src/main/js/helpers/handlebars/fromNow.js +++ b/server/sonar-web/src/main/js/helpers/handlebars/fromNow.js @@ -18,10 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ const IntlRelativeFormat = require('intl-relativeformat'); +const { parseDate } = require('../../helpers/dates'); const { DEFAULT_LANGUAGE } = require('../../helpers/l10n'); module.exports = function(date) { return new IntlRelativeFormat(localStorage.getItem('l10n.locale') || DEFAULT_LANGUAGE).format( - date + parseDate(date) ); }; -- cgit v1.2.3