blob: 7ea00670c33f97e1a50ca8f28c431cb21c359fcb [file] [log] [blame]
function completaHTML() {
document.getElementById("data").innerHTML = data;
var trobat = false;
for (i = 0; i < dataHorarisAlumne.length; i++) {
var h = dataHorarisAlumne[i].hora[hora_actual.getDay()].split(":");
var hAct = hora_actual.getHours() - 1;
if(hAct < 10) hAct = "0" + hAct;
if(h[0] == hAct) {
trobat = true;
document.getElementById("assignatura").innerHTML = dataHorarisAlumne[i].nom;
document.getElementById("aula").innerHTML = "Aula " + dataHorarisAlumne[i].aula;
}
}
if(!trobat) {
document.getElementById("assignatura").innerHTML = "No tens cap assignatura ara mateix de les que curses";
}
}