lo script che ho usato è questo:
dat = new Date();
dat_corr = dat.getDate()+"/"+(dat.getMonth()+1)+"/"+dat.getFullYear();
ora_corr = dat.getHours()+"."+dat.getMinutes()+"."+dat.getSec onds();
giorno = dat.getDay();
if (giorno == 1) {
sett = "lunedì";
} else if (giorno == 2) {
sett = "martedì";
} else if (giorno == 3) {
sett = "mercoledì";
} else if (giorno == 4) {
sett = "giovedì";
} else if (giorno == 5) {
sett = "venerdì";
} else if (giorno == 6) {
sett = "sabato";
} else if (giorno == 0) {
sett = "domenica";
}