現在時刻から5月8日23時59分59秒~5月9日1秒前までの日数・時間・分をカウントし、FlipClockでカウンターとして表示するスクリプトを持っているのですが、なぜか欠落しています。 2日と1時間。今日 3 月 23 日 10:37 (24 時間時計) から 48 日 13 時間 23 分ですが、私の時計は 46 日 12 時間 23 分を示しています。
非常に単純なはずですが、2 日と 1 時間がどこで失われたのかわかりません。
私はこのJavaScriptを持っています:
// Grab the current date
var currentDate = new Date();
// Set the date to May 8
var futureDate = new Date(2016, 04, 08, 23, 59, 59);
// Calculate the difference in seconds between the future and current date
var diff = futureDate.getTime() / 1000 - currentDate.getTime() / 1000;
var clock = new FlipClock($('.clock'), diff, {
clockFace: 'DailyCounter',
countdown: true,
showSeconds: false,
language: 'da'
});