我想檢查給定日期和現在之間的差異。我想完全使用下面的代碼,它在 chrome 中運行良好。但控制臺日志在 Firefox 中顯示了其他內容。為什么?以及如何解決這個問題?// input your custom Date belowconst date = new Date('2020-6-23 14:22:00 GMT+0430'); // Set End Time Here!const dif = (date.getTime() / 1000) - ((new Date().getTime())/1000);const end = Math.max(0, dif);console.log(date, dif, end);
為什么新日期在 Firefox 瀏覽器中不起作用
慕桂英546537
2022-10-13 16:40:08