aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2017-09-11 17:56:27 +0200
committerStas Vilchik <stas.vilchik@sonarsource.com>2017-09-13 13:53:58 +0200
commit05c479bafd88810399d82d88859d040b035a7d86 (patch)
tree7294c5833127451d1bd68f5afcfaa8d8675c6da9
parent6884f8ff296e46cdddf413967eedd85430442aac (diff)
downloadsonarqube-05c479bafd88810399d82d88859d040b035a7d86.tar.gz
sonarqube-05c479bafd88810399d82d88859d040b035a7d86.zip
parse date in fromNow helper
-rw-r--r--server/sonar-web/src/main/js/helpers/handlebars/fromNow.js3
1 files changed, 2 insertions, 1 deletions
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)
);
};