This commit is contained in:
2022-04-11 09:00:52 +02:00
parent c97d7c42c9
commit f4ae53338c
11 changed files with 236 additions and 35 deletions

30
javascript/ido/script.js Normal file
View File

@@ -0,0 +1,30 @@
function time(){
const d = new Date();
let year = d.getFullYear();
let month = d.getMonth() + 1;
let day = d.getDate();
let day2 ="";
let hour = d.getHours();
let min = d.getMinutes();
let sec = d.getSeconds();
if(d.getDay() == 0){
day2 = "hétfő";
}else if(d.getDay() == 1){
day2 = "kedd";
}else if(d.getDay() == 2){
day2 = "szerda";
}else if(d.getDay() == 3){
day2 = "csütörtök";
}else if(d.getDay() == 4){
day2 = "péntek";
}else if(d.getDay() == 5){
day2 = "szombat";
}else if(d.getDay() == 6){
day2 = "vasárnap";
}
document.getElementById("ido").innerText = year + "." + month + "." + day + " (" + day2 + ") " + hour + ":" + min + ":" + sec;
setTimeout("time()", 1000);
}