add mail of cody and fix days of the year
This commit is contained in:
parent
34e962ad9e
commit
b9b5f8dc4f
@ -289,7 +289,7 @@
|
|||||||
<li>350gHackBitte</li>
|
<li>350gHackBitte</li>
|
||||||
<li>Otto</li>
|
<li>Otto</li>
|
||||||
<li>Keklasini</li>
|
<li>Keklasini</li>
|
||||||
<li><a href="https://jg-cody.de/" target="_blank">JG-Cody</a></li>
|
<li><a href="https://jg-cody.de/" target="_blank">JG-Cody</a> (E-Mail: <a href="mailto:cody@cringe-studios.com" target="_blank">cody@cringe-studios.com</a>)</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -413,7 +413,9 @@
|
|||||||
function leapYear(year){
|
function leapYear(year){
|
||||||
return ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0);
|
return ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const dayOfYear = date => Math.floor((date - new Date(date.getFullYear(), 0, 0)) / 1000 / 60 / 60 / 24);
|
||||||
|
|
||||||
function myTimer2() {
|
function myTimer2() {
|
||||||
var d = new Date();
|
var d = new Date();
|
||||||
if(Math.floor((d.getMilliseconds() + 1000 * (d.getSeconds() % 2))/400) != previousValue2){
|
if(Math.floor((d.getMilliseconds() + 1000 * (d.getSeconds() % 2))/400) != previousValue2){
|
||||||
@ -428,7 +430,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
previousValue2 = Math.floor((d.getMilliseconds() + 1000 * (d.getSeconds() % 2))/400);
|
previousValue2 = Math.floor((d.getMilliseconds() + 1000 * (d.getSeconds() % 2))/400);
|
||||||
document.getElementById("negclock").innerHTML = ((leapYear(d.getFullYear()) ? 365 : 364) - d.getDay()).toString().padStart(3, '0') + "+" + (23 - d.getHours()).toString().padStart(2, '0') + ":" + (59 - d.getMinutes()).toString().padStart(2, '0') + ":" + (59 - d.getSeconds()).toString().padStart(2, '0') + "." + d.getMilliseconds().toString().padStart(3, '0');
|
document.getElementById("negclock").innerHTML = ((leapYear(d.getFullYear()) ? 365 : 364) - dayOfYear(d)).toString().padStart(3, '0') + "+" + (23 - d.getHours()).toString().padStart(2, '0') + ":" + (59 - d.getMinutes()).toString().padStart(2, '0') + ":" + (59 - d.getSeconds()).toString().padStart(2, '0') + "." + d.getMilliseconds().toString().padStart(3, '0');
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user