From b53df2d6a90a88058c3d30ccf2db27becde134df Mon Sep 17 00:00:00 2001 From: Jens Hausdorf Date: Fri, 22 Dec 2017 00:40:35 +0100 Subject: [PATCH] `new Date().getTime` to `Date.now()` (#2506) --- wcfsetup/install/files/js/WoltLabSuite/Core/Date/Util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Date/Util.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Date/Util.js index 49e246f1fe..800e919723 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Date/Util.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Date/Util.js @@ -244,7 +244,7 @@ define(['Language'], function(Language) { elData(time, 'time', formattedTime); elData(time, 'offset', date.getTimezoneOffset() * 60); // PHP returns minutes, JavaScript returns seconds - if (date.getTime() > new Date().getTime()) { + if (date.getTime() > Date.now()) { elData(time, 'is-future-date', 'true'); time.textContent = Language.get('wcf.date.dateTimeFormat').replace('%time%', formattedTime).replace('%date%', formattedDate); -- 2.20.1