aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/helpers/handlebars/dt.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/helpers/handlebars/dt.js')
-rw-r--r--server/sonar-web/src/main/js/helpers/handlebars/dt.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/server/sonar-web/src/main/js/helpers/handlebars/dt.js b/server/sonar-web/src/main/js/helpers/handlebars/dt.js
index 708be097e33..3af77ae1d6c 100644
--- a/server/sonar-web/src/main/js/helpers/handlebars/dt.js
+++ b/server/sonar-web/src/main/js/helpers/handlebars/dt.js
@@ -17,8 +17,12 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-const moment = require('moment');
-
module.exports = function(date) {
- return moment(date).format('LLL');
+ return new Intl.DateTimeFormat(localStorage.getItem('l10n.locale') || 'en', {
+ year: 'numeric',
+ month: 'long',
+ day: 'numeric',
+ hour: 'numeric',
+ minute: 'numeric'
+ }).format(new Date(date));
};