MediaWiki:Common.js/Date.js

//************************************************ // displayTimer - By User:Manic The Hedgehog //************************************************ var refreshDate; var tMS = 5000;

function addDate { var UTCString = new Date.toUTCString; //Format will be 'M D H:M:S (UTC)' var dateArray = { Day: UTCString.substring(0,3), D: UTCString.substring(5,7), M: UTCString.substring(8,11), Y: UTCString.substring(12,16), h: UTCString.substring(17,19), m: UTCString.substring(20,22), s: UTCString.substring(23,25) };   var dateString = dateArray['M'] + " " + dateArray['D'] + " " + dateArray['h'] + ":" + dateArray['m'] + ":" + dateArray['s'] + " (UTC)"; var toSend = ' ' + dateString + ' '; $('#showdate').empty.append(toSend); window.clearTimeout(refreshDate); refreshDate = window.setTimeout(addDate, tMS); } $(document).ready(function {   var leadingLI = ' ';    (skin == 'oasis') ? $(leadingLI).appendTo('#GlobalNavigation') : null;    addDate;    refreshDate = window.setTimeout(addDate, tMS);    $('#displayTimer').css({'font-size': "11px"}); });