Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
1366
_assets/javascripts/global/countdown.js
Normal file
1366
_assets/javascripts/global/countdown.js
Normal file
File diff suppressed because it is too large
Load Diff
@ -32,4 +32,19 @@ $(function() {
|
||||
throttle: 250,
|
||||
unload: false
|
||||
});
|
||||
|
||||
let countdownSpan = $("#countdown");
|
||||
countdown.setFormat({singular: " Millisekunde| Sekunde| Minute| Stunde| Tag| Woche| Monat| Jahr| Jahrzehnt| Jahrhundert| Jahrtausend",
|
||||
plural: " Millisekunden| Sekunden| Minuten| Stunden| Tage| Wochen| Monate| Jahre| Jahrzehnte| Jahrhunderte| Jahrtausende",
|
||||
last: " und ",
|
||||
delim: ", "});
|
||||
let counterID = countdown(function(timestamp) {
|
||||
countdownSpan.innerText = timestamp.toLocaleString();
|
||||
}, new Date(2019, 5, 26, 18, 0),
|
||||
countdown.DAYS |
|
||||
countdown.HOURS |
|
||||
countdown.MINUTES |
|
||||
countdown.SECONDS
|
||||
);
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user