blob: 7ea00670c33f97e1a50ca8f28c431cb21c359fcb [file] [log] [blame]
Dani Vilardelld4f2c902020-09-23 13:54:19 +02001
2function completaHTML() {
3 document.getElementById("data").innerHTML = data;
4 var trobat = false;
5 for (i = 0; i < dataHorarisAlumne.length; i++) {
Dani Vilardell824ec332020-09-23 16:00:40 +02006 var h = dataHorarisAlumne[i].hora[hora_actual.getDay()].split(":");
Dani Vilardelld4f2c902020-09-23 13:54:19 +02007 var hAct = hora_actual.getHours() - 1;
Dani Vilardelld4f2c902020-09-23 13:54:19 +02008 if(hAct < 10) hAct = "0" + hAct;
9 if(h[0] == hAct) {
10 trobat = true;
11 document.getElementById("assignatura").innerHTML = dataHorarisAlumne[i].nom;
12 document.getElementById("aula").innerHTML = "Aula " + dataHorarisAlumne[i].aula;
13 }
14 }
15 if(!trobat) {
16 document.getElementById("assignatura").innerHTML = "No tens cap assignatura ara mateix de les que curses";
17 }
18
19}