gustav: Datumausgabe per javaScript?!

Beitrag lesen

Hallo,

ich möchte per javaScript das Datum ausgeben, unter IE funktioniert es, aber unter Mozilla wird das Jahr staat "2003" "103" angezeigt, und das Code dazu sieht wiefolgt aus:

<script language="JavaScript" type="text/javascript">
var ie = ((document.all) && (window.offscreenBuffering)) ? true : false; // IE >= 4.x
var ns = ((document.captureEvents) && (!document.getElementById)) ? true : false; // NN4.x
var mz = ((document.getElementById) && (!document.all) && (document.documentElement)) ? true : false; // NN6/MZ
Wochentagname=new Array("Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag");
var monthname=new Array("Jan.","Feb.","Mär.","Apr.","Mai","Juni","Juli","Aug.","Sept.","Okt.","Nov.","Dez.")

if (ie || ns ||mz)
{
function showtime() {
now = new Date();
var Tag = now.getDate();
var Monat = now.getMonth() + 1;
var Jahr = now.getYear();
var WoTag = now.getDay();

var Vortag = ((Tag < 10) ? "0" : "");
var Vormon = ((Monat < 10) ? ".0" : ".");

var Datum = Vortag + Tag + ". " + monthname[Monat-1] + " " + Jahr;
Zeit=Wochentagname[WoTag]+' '+Datum;

if(ie || mz) { // IE4+ und NN6
if (document.all) links = (document.body.clientWidth - 125);
else links = (window.innerWidth - 125)+'px';
document.getElementById('uhr').innerHTML = Zeit;
document.getElementById('uhr').style.left = links;
}

else if(ns)
{
document.uhr.document.open();
nachrechts = window.innerWidth - 125;
Zeit = '<span class="Uhr">' + Zeit + '</span>';
document.uhr.moveTo (nachrechts,20);
document.uhr.document.write(Zeit);
document.uhr.document.close();
}
window.setTimeout("showtime()",1000);
}
}
</script>

es wäre nett, wenn jemand mir weiterhelfen würde.

Gruß
G.M.