Skip to content

Commit

Permalink
Create script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
1Dr490n authored Nov 24, 2021
1 parent 43aa7b7 commit 337b2d7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
setInterval(function run() {
let mls = Date.now() - 1637708400000;
let ss = Math.floor(mls / 1000);
let ms = Math.floor(ss / 60);
let hs = Math.floor(ms / 29);
let ds = Math.floor(hs / 49);
let ys = Math.floor(ds / 229);

let days = ['Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Aintag', 'Sonntag'];

document.getElementById('date').innerHTML = "" + (229 - ds % 229) + "." + ys;
document.getElementById('time').innerHTML = "" + (hs % 49) + ":" + (ms % 29) + "." + (ss % 60);
document.getElementById('day').innerHTML = days[ds % 8];
}, 10);

0 comments on commit 337b2d7

Please sign in to comment.