var mydate=new Date()
var theyear=mydate.getYear()
if (theyear < 1000)
theyear+=1900
var theday=mydate.getDay()
var themonth=mydate.getMonth()+1
if (themonth<10)
themonth="0"+themonth
var theday=mydate.getDate()
if (theday<10)
theday="0"+theday
var today=mydate.getDay()

if (today==1)
document.write('Dnes je pondelok ')
else if (today==2)
document.write('Dnes je utorok ')
else if (today==3)
document.write('Dnes je streda ')
else if (today==4)
document.write('Dnes je štvrtok ')
else if (today==5)
document.write('Dnes je piatok ')
else if (today==6)
document.write('Dnes je sobota ')
else
document.write('Dnes je nedeľa ')
document.writeln(theday+". "+themonth+". "+theyear)

