﻿function dtime()
{
var today=new Date();
	var weekday=new Array("Duminică","luni","marţi","miercuri","joi","vineri","sîmbătă");
	var month ;
				switch (today.getMonth())
				{
				case 0: month="ianuarie"; break;
				case 1: month="februarie"; break;
				case 2: month="martie"; break;
				case 3: month="aprilie"; break;
				case 4: month="mai"; break;
				case 5: month="iunie"; break;
				case 6: month="iulie"; break;
				case 7: month="august"; break;
				case 8: month="septembrie"; break;
				case 9: month="octombrie"; break;
				case 10: month="noiembrie"; break;
				case 11: month="decembrie"; break;
				default : month="ianuarie";
				}
	var year = today.getYear(); if (year < 2000) year = year + 1900;

	var hours = today.getHours();
	var minutes = today.getMinutes();
	var seconds = today.getSeconds();
	var timesuffix = "AM";
		if (hours > 11){timesuffix = "PM";hours = hours - 12;};if (hours == 0){hours = 12;}
		if (hours < 10){hours = "0" + hours;};if (minutes < 10){minutes = "0" + minutes;};if (seconds < 10){seconds = "0" + seconds;}
var clocklocation = document.getElementById('digitalclock');
clocklocation.innerHTML =weekday[today.getDay()]+', '+today.getDate()+' '+month+', '+year;
setTimeout("dtime()", 1000);
}
dtime();
