﻿function getLongDateString()
{
	//Returns a date string of the form: Day DD Month,YYYY (e.g. Sunday 27 September, 1998)
	monthNames = new Array("siječnja","veljače","ožujka","travnja","svibnja","lipnja","srpnja","kolovoza","rujna","listopada","studenog","prosinca");
	dayNames = new Array("nedjelja","ponedjeljak","utorak","srijeda","četvrtak","petak","subota");
	dayOfWeek = this.getDay();
	day = dayNames[dayOfWeek];
	dateOfMonth = this.getDate();
	monthNo = this.getMonth();
	month = monthNames[monthNo];
	year = this.getYear();
	if (year < 2000)
		year = year + 1900;
		dateStr = dateOfMonth+". "+month+" "+year+".";
		return dateStr;
}
	//register the  method in the class Date
	Date.prototype.getLongDateString=getLongDateString;

function DocDate()
{ //return the document modification date (excl.time) as a string
	DateTimeStr = document.lastModified;
	secOffset = Date.parse(DateTimeStr);
	if (secOffset == 0 || secOffset == null) //Opera3.2
		dateStr = "nepoznato";
	else
	{
		aDate = new Date();
		aDate.setTime(secOffset);
		datestr = aDate.getLongDateString();
	}
	return dateStr;
}
document.write("<center> Zadnja izmjena: ");
document.writeln(DocDate(),"</center>");