• Versandkostenfrei 0000000
  • Kauf direkt vom Hersteller
function countdown( dateEnd ) { var timer, days, hours, minutes, seconds; dateEnd = new Date( dateEnd ); dateEnd = dateEnd.getTime(); var today = new Date(); Date.prototype.stdTimezoneOffset = function () { var jan = new Date(this.getFullYear(), 0, 1); var jul = new Date(this.getFullYear(), 6, 1); return Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset()); } Date.prototype.isDstObserved = function () { return this.getTimezoneOffset() < this.stdTimezoneOffset(); } if ( isNaN( dateEnd ) ) { return; } timer = setInterval( calculate, 1000 ); function calculate() { var dateStart = new Date(); var dateStart = new Date( dateStart.getUTCFullYear(), dateStart.getUTCMonth(), dateStart.getUTCDate(), dateStart.getUTCHours(), dateStart.getUTCMinutes(), dateStart.getUTCSeconds() ); var timeRemaining = parseInt( ( dateEnd - dateStart.getTime() ) / 1000 ); var daysClass = document.getElementsByClassName("days660d09d69fc17"), hoursClass = document.getElementsByClassName("hours660d09d69fc17"), minutesClass = document.getElementsByClassName("minutes660d09d69fc17"), secondsClass = document.getElementsByClassName("seconds660d09d69fc17"), countdownClass = document.getElementsByClassName("countDown660d09d69fc17"); if ( timeRemaining >= 0 ) { days = parseInt( timeRemaining / 86400 ); timeRemaining = ( timeRemaining % 86400 ); if (today.isDstObserved()) { hours = parseInt( timeRemaining / 3600 ); } else { hours = parseInt( (timeRemaining / 3600) - 1 ); } timeRemaining = ( timeRemaining % 3600 ); minutes = parseInt( timeRemaining / 60 ); timeRemaining = ( timeRemaining % 60 ); seconds = parseInt( timeRemaining ); for (var i = 0; i < daysClass.length; i++) { daysClass[i].innerHTML = parseInt( days, 10 ); } for (var i = 0; i < hoursClass.length; i++) { hoursClass[i].innerHTML = ( "0" + hours ).slice( -2 ); } for (var i = 0; i < minutesClass.length; i++) { minutesClass[i].innerHTML = ( "0" + minutes ).slice( -2 ); } for (var i = 0; i < secondsClass.length; i++) { secondsClass[i].innerHTML = ( "0" + seconds ).slice( -2 ); } for (var i = 0; i < countdownClass.length; i++) { countdownClass[i].classList.remove("spin"); } if ( parseInt( days, 10 ) == 1 ) { for (var i = 0; i < daysClass.length; i++) { daysClass[i].classList.add("one"); } } if ( parseInt( days, 10 ) == 0 ) { for (var i = 0; i < daysClass.length; i++) { daysClass[i].classList.add("hide"); } } } else { for (var i = 0; i < countdownClass.length; i++) { countdownClass[i].innerHTML = "Aktion beendet"; } } } function display( days, hours, minutes, seconds ) {} } countdown( '2024-04-30T00:00:00+02:00' );
  • Versandkostenfrei 0000000innerhalb Deutschlands
  • Kauf direkt vom Hersteller
function countdown( dateEnd ) { var timer, days, hours, minutes, seconds; dateEnd = new Date( dateEnd ); dateEnd = dateEnd.getTime(); var today = new Date(); Date.prototype.stdTimezoneOffset = function () { var jan = new Date(this.getFullYear(), 0, 1); var jul = new Date(this.getFullYear(), 6, 1); return Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset()); } Date.prototype.isDstObserved = function () { return this.getTimezoneOffset() < this.stdTimezoneOffset(); } if ( isNaN( dateEnd ) ) { return; } timer = setInterval( calculate, 1000 ); function calculate() { var dateStart = new Date(); var dateStart = new Date( dateStart.getUTCFullYear(), dateStart.getUTCMonth(), dateStart.getUTCDate(), dateStart.getUTCHours(), dateStart.getUTCMinutes(), dateStart.getUTCSeconds() ); var timeRemaining = parseInt( ( dateEnd - dateStart.getTime() ) / 1000 ); var daysClass = document.getElementsByClassName("days660d09d69fe88"), hoursClass = document.getElementsByClassName("hours660d09d69fe88"), minutesClass = document.getElementsByClassName("minutes660d09d69fe88"), secondsClass = document.getElementsByClassName("seconds660d09d69fe88"), countdownClass = document.getElementsByClassName("countDown660d09d69fe88"); if ( timeRemaining >= 0 ) { days = parseInt( timeRemaining / 86400 ); timeRemaining = ( timeRemaining % 86400 ); if (today.isDstObserved()) { hours = parseInt( timeRemaining / 3600 ); } else { hours = parseInt( (timeRemaining / 3600) - 1 ); } timeRemaining = ( timeRemaining % 3600 ); minutes = parseInt( timeRemaining / 60 ); timeRemaining = ( timeRemaining % 60 ); seconds = parseInt( timeRemaining ); for (var i = 0; i < daysClass.length; i++) { daysClass[i].innerHTML = parseInt( days, 10 ); } for (var i = 0; i < hoursClass.length; i++) { hoursClass[i].innerHTML = ( "0" + hours ).slice( -2 ); } for (var i = 0; i < minutesClass.length; i++) { minutesClass[i].innerHTML = ( "0" + minutes ).slice( -2 ); } for (var i = 0; i < secondsClass.length; i++) { secondsClass[i].innerHTML = ( "0" + seconds ).slice( -2 ); } for (var i = 0; i < countdownClass.length; i++) { countdownClass[i].classList.remove("spin"); } if ( parseInt( days, 10 ) == 1 ) { for (var i = 0; i < daysClass.length; i++) { daysClass[i].classList.add("one"); } } if ( parseInt( days, 10 ) == 0 ) { for (var i = 0; i < daysClass.length; i++) { daysClass[i].classList.add("hide"); } } } else { for (var i = 0; i < countdownClass.length; i++) { countdownClass[i].innerHTML = "Aktion beendet"; } } } function display( days, hours, minutes, seconds ) {} } countdown( '2024-04-30T00:00:00+02:00' );
Anmelden Registrieren