// datetext.js by David Shepheard. Copyright David Shepheard 22 May 2003
//
// Designed specially for Virtual Eclipse. This script adds a sentence with the IN CHARACTER date to a document.
// The sentence is shown on compatible browsers, but non-JavaScript browsers do not show anything.
//
// Text displayed is in the format:
// Today is 22 May 303 AI (2519 AD).
//
var monthNames = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
var now = new Date();
document.write("Today is "); // Start of sentence including space
document.write(now.getDate() + " " + monthNames[now.getMonth()] + ", " + (now.getYear()-1700));  // DD, Month YYYY AI Date
document.write(" AI ("); // Middle of sentence with opening bracket
document.write((now.getYear()+516));  // VE AD Year
document.write(" AD). "); // Closing bracket, full stop and trailing space
