Kod:
function ispisiDatum(){
var currentTime = new Date();
var month = currentTime.getMonth();
if(month == 0){mjesec = "Jan"}
if(month == 1){mjesec = "Feb"}
if(month == 2){mjesec = "Mar"}
if(month == 3){mjesec = "Apr"}
if(month == 4){mjesec = "Maj"}
if(month == 5){mjesec = "Jun"}
if(month == 6){mjesec = "Jul"}
if(month == 7){mjesec = "Avg"}
if(month == 8){mjesec = "Sep"}
if(month == 9){mjesec = "Okt"}
if(month == 10){mjesec = "Nov"}
if(month == 11){mjesec = "Dec"}
var datum = currentTime.getDate();
var godina = currentTime.getFullYear();
var sat = currentTime.getUTCHours();
var minut =currentTime.getUTCMinutes();
document.write("Danas je "+datum+". "+mjesec+" "+godina+", "+sat+":"+minut)
}
