wallpaper.html from mystiquehaz3-hd
timeDisplay = document.createTextNode ( "" );
document.getElementById("clock").appendChild ( timeDisplay ); }
function updateClock ( )
{
var currentTime = new Date ( );
var currentHours = currentTime.getHours ( );
var currentMinutes = currentTime.getMinutes ( );
var currentSeconds = currentTime.getSeconds ( );
// Pad the minutes and seconds with leading zeros, if required
currentMinutes = ( currentMinutes < 10 ? "0" : "" ) + currentMinutes;
currentSeconds = ( currentSeconds < 10 ? "0" : "" ) + currentSeconds;
// Choose either "AM" or "PM" as appropriate
var timeOfDay = ( currentHours < 24 ) ? "" : "";
// Convert the hours component to 12-hour format if needed
currentHours = ( currentHours > 24 ) ? currentHours - 24 : currentHours;
// Convert an hours component of "0" to "12"
currentHours = ( currentHours == 0 ) ? 24 : currentHours;
// Compose the string for display
var currentTimeString = currentHours + ":" + currentMinutes;
// Update the time display
document.getElementById("clock").firstChild.nodeValue = currentTimeString; }
function init2 ( )
{
timeDisplay = document.createTextNode ( "" );
document.getElementById("ampm").appendChild ( timeDisplay ); }
function amPm ( )
{
var currentTime = new Date ( );
var currentHours = currentTime.getHours ( );
// Choose either "AM" or "PM" as appropriate
var timeOfDay = ( currentHours < 12 ) ? "" : "";
// Convert the hours component to 12-hour format if needed
currentHours = ( currentHours > 24 ) ? currentHours - 24 : currentHours;
// Convert an hours component of "0" to "12"
currentHours = ( currentHours == 0 ) ? 24 : currentHours;
// Compose the string for display
var currentTimeString = timeOfDay;
// Update the time display
document.getElementById("ampm").firstChild.nodeValue = currentTimeString; }
function init3 ( )
{
timeDisplay = document.createTextNode ( "" );
document.getElementById("calendar").appendChild ( timeDisplay ); }
function calendarDate ( )
{
var this_weekday_name_array = new Array("Sunday","Monday","Tuesday","Wednessday","Thursday","Friday","Saturday")
var this_month_name_array = new Array(". January",". February",". March",". April",". May",". June",". July",". August",". September",". Oktober",". November",". December") //predefine month names
var this_date_timestamp = new Date()
var this_weekday = this_date_timestamp.getDay()
var this_date = this_date_timestamp.getDate()
var this_month = this_date_timestamp.getMonth()
document.getElementById("calendar").firstChild.nodeValue = this_weekday_name_array[this_weekday] + ", " + " " + this_date + this_month_name_array[this_month] //concat long date string }