// array declaration
days = new Array();

// fill the array days with strings
days[0] = "Nedelja";
days[1] = "Ponedeljek";
days[2] = "Torek"; 
days[3] = "Sreda";
days[4] = "Četrtek";
days[5] = "Petek";
days[6] = "Sobota";

// array declaration
months = new Array();

// fill the array months with strings
months[0] = "januar";
months[1] = "februar";
months[2] = "marec";
months[3] = "april";
months[4] = "maj";
months[5] = "junij";
months[6] = "julij";
months[7] = "avgust";
months[8] = "september";
months[9] = "oktober"; 
months[10] = "november";
months[11] = "december";

// get today's date object
// output: Fri Jul 12 17:17:34 GMT+0200 (Central Europe Daylight Time) 2002
today = new Date();

// get day from our new object
dayNumber = today.getDay(); // 0 = Sunday, 1 = Monday,...
dayName = days[dayNumber]; // get name of day

// get date from our new object
date = today.getDate();

// get month from our object
monthNumber = today.getMonth();
monthName = months[monthNumber];

year = today.getYear();
if (year < 2000)      // Netscape 6.2.3 and IE 6.0 need this
  year = year + 1900;

document.write(dayName + ", " + date + ". " + monthName + " " + year);  // Petek, 12. julij 2002