dat = new Date() ng=dat.getDate() //come 25 gg=ng+ "/ "+(dat.getMonth()+1) //come 25/3 nm=(dat.getMonth()+1) //come 3 var mm = new Array(12); mm[1] = " Enero " ; mm[2] = " Febrero " ; mm[3] = " Marzo " ; mm[4] = " Abril " ; mm[5] = " Mayo " ; mm[6] = " Junio " ; mm[7] = " Julio " ; mm[8] = " Agosto " ; mm[9] = " Septiembre " ; mm[10] = " Octubre " ; mm[11] = " Noviembre " ; mm[12] = " Diciembre " ; ggg = new Array(7) ggg[0] = " Domingo " ; ggg[1] = " Lunes " ; ggg[2] = " Martes " ; ggg[3] = " miércoles " ; ggg[4] = " jueves " ; ggg[5] = " Viernes " ; ggg[6] = " Sábado "; gggg=(ggg[dat.getDay()]) //come sabato mmm = mm[dat.getMonth() + 1] //come marzo aaa = dat.getYear() //come 2000 hh=(dat.getHours()+100).toString().substring(1,3); min=(dat.getMinutes()+100).toString().substring(1,3) sec=(dat.getSeconds()+100).toString().substring(1,3) dw=document.write dc = (gggg+ " " +ng+ " " +mmm+ " "+aaa+ " " + hh + ": "+min+ ": "+ sec); bn="Buena madrugada " //Buona notte // Good night Buena madrugada bg="Buenos días " //Buon giorno // Good morning Bueno día bp="Buenas tardes " //Buon pomeriggio // Good afternoon Buena tarde bs="Buenas noches " //Buona sera // Good evening Buena noche ae="¡Ahora es tiempo de dormir!" //Adesso è ora di dormire! // Is time now of to sleep! ¡Es ahora tiempo de dormir! if (hh >=00 && hh < 08) {dw( bn) } if (hh>=08 && hh <= 12) {dw(bg)}if (hh>=13 && hh<= 19){dw(bp)}if(hh>19){dw(bs)}if(hh>=02 && hh<= 07) {dw(ae)} dw( " es "+dc+ " ")