generated from Comenius-Institut/OER-Vorlage
tage-bis-weihnachten.md hinzugefügt
This commit is contained in:
parent
47df5fa9e5
commit
8262d6dec2
20
tage-bis-weihnachten.md
Normal file
20
tage-bis-weihnachten.md
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
## Tage bis Weihnachten:
|
||||||
|
|
||||||
|
Weihnachten:
|
||||||
|
<script format="relativetime" unit="day" locale="de">
|
||||||
|
// Datum von Weihnachten
|
||||||
|
const christmasDate = new Date('2024-12-24');
|
||||||
|
// Get the current time
|
||||||
|
const currentDate = new Date();
|
||||||
|
// Unterschied in Millisekunden berechnen
|
||||||
|
const differenceInMs = currentDate - christmasDate;
|
||||||
|
|
||||||
|
// Millisekunden in Tage umwandeln
|
||||||
|
const differenceInDays = differenceInMs / (1000 * 60 * 60 * 24);
|
||||||
|
// Umrechnen in volle Tage
|
||||||
|
const WeihnachtsCountdown = Math.floor(differenceInDays);
|
||||||
|
|
||||||
|
// Return result
|
||||||
|
-WeihnachtsCountdown
|
||||||
|
</script>
|
||||||
|
!
|
Loading…
Reference in a new issue