`new Date().getTime` to `Date.now()` (#2506)
authorJens Hausdorf <hello@jens-hausdorf.de>
Thu, 21 Dec 2017 23:40:35 +0000 (00:40 +0100)
committerTim Düsterhus <timwolla@googlemail.com>
Thu, 21 Dec 2017 23:40:35 +0000 (00:40 +0100)
wcfsetup/install/files/js/WoltLabSuite/Core/Date/Util.js

index 49e246f1fe892b51bb4d79baadad7877687cb2ed..800e9197238ab99ee1822c0542877e1573d8e05f 100644 (file)
@@ -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);