/*	This JavaScript routine was developed by Togodumnus for www.Roman-Britain.org
	Permission is given to do whatever the hell you like with it!
	Just remember where you got it from.
	To utilise, simply include the following line within your HTML:

	<script type="text/JavaScript" src="romandate.js"></script>

	Have fun Dude! */
/* fncRomanDay variables */
var RomanDayText = new Array("Phoebus, the Sun Apollo","Luna Selene, Diana Phoebe","Mars, red Ares,<br/>master of Flight and Terror","Mercury,<br/>swift Hermes, the winged messenger","Jupiter Zeus,<br/> powerful King of the Gods","Venus Aphrodite;<br/>both Hesperos and Lucifer","Saturn, slow Kronos");
function fncRomanDay(iDay)
{	return RomanDayText[iDay];
}
/* fncRomanMonth variables */
var RomanMonthText = new Array("Januarius","Februarius","Martius","Aprilis","Maius","Junius","Julius","Augustus","September","October","November","December");
function fncRomanMonth(iMonth)
{	return RomanMonthText[iMonth];
}
function fncSuffixDate(date)
{	/* AMENDMENT: Convert into giving date in format: (n days before) the (Calends/Nones/Ides) of (month) */
	var suffix = "th";
	var n = date-(Math.floor(date/10)*10);
	if (date <= 3 || date >=21)
	{	if (n == 1) { suffix = "st"; }
		if (n == 2) { suffix = "nd"; }
		if (n == 3) { suffix = "rd"; }
	}
	return date+suffix+" day";
}
function fncRomanDate(iDate ,bText)
{	var dateText = "Today is the day of "+fncRomanDay(iDate.getDay())+bText+"<br/>";
	dateText += "the "+fncSuffixDate(iDate.getDate());
	dateText += " of "+fncRomanMonth(iDate.getMonth())+bText+"<br/>";
	dateText += "in the Year of our Lord "+iDate.getFullYear();
	return dateText;
}
var RomanDate = new Date();
document.write(fncRomanDate(RomanDate,', '));

