From a42ec8f6b927a275e302875d13ef50010656900a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Wed, 29 Apr 2020 23:59:42 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20[JS=20crap]=20date.getMonth()=20starts?= =?UTF-8?q?=20at=200=20=C2=AF\=5F(=E3=83=84)=5F/=C2=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- website/web/templates/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/web/templates/index.html b/website/web/templates/index.html index 2b7c89c2..f4d26c3a 100644 --- a/website/web/templates/index.html +++ b/website/web/templates/index.html @@ -21,7 +21,7 @@ $(document).ready(function () { "targets": 1, "render": function ( data, type, row, meta ) { let date = new Date(data); - return date.getFullYear() + '-' + date.getMonth().toString().padStart(2, "0") + '-' + date.getDate().toString().padStart(2, "0") + ' ' + date.toTimeString(); + return date.getFullYear() + '-' + (date.getMonth() + 1).toString().padStart(2, "0") + '-' + date.getDate().toString().padStart(2, "0") + ' ' + date.toTimeString(); } }] } );