// Javascript code to add the current date (local) and the current UTC time to each page on the site
// Script written by William Green.

// Define variables to retrieve current date and UTC time
var d = new Date();
var dayOfWeek= d.getUTCDay();
var dayOfMonth = d.getUTCDate();
var currentMonth = d.getUTCMonth();
var currentYear= d.getUTCFullYear();
var currentHour = d.getUTCHours();
var currentMinutes = d.getUTCMinutes();

// Define arrays to hold month and day information
var m = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
var today = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", " Saturday");

// convert current hour to a string, then check to see if it is one or two characters in length.  If it's one character, append a '0' to the begining of the hour.
var theHour = currentHour.toString();
if (theHour.length < 2)
{
    theHour = "0" + theHour;
}

// convert current minute to a string and check for character length...add a '0' if character length is less than 2.
var theMinute = currentMinutes.toString();
if (theMinute.length < 2)
{
    theMinute = "0" + theMinute;    
}

// write the current date and UTC time to the page.
 document.writeln(today[dayOfWeek] + ", " + m[currentMonth] + " " + dayOfMonth + ", " + currentYear + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
document.writeln(theHour + ":" + theMinute + " Zulu&nbsp;&nbsp;&nbsp;&nbsp;");



