Hey, ich hoffe mal, ich habe hier das richtige Forum erwischt ^.-
folgender Code
<SCRIPT LANGUAGE="JavaScript">
function DateEstablished(startmonth, startdate, startyear) {
sdate=startdate;
smonth=startmonth-1;
syear=startyear;
var DaysInMonth = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
today = new Date()
var thisyear = today.getFullYear();
var thismonth = today.getMonth();
var thisdate = today.getDate();
mstart = new Date(syear,(smonth==12?1:smonth+1),1);
days1 = (mstart - new Date(syear,smonth,sdate))/(24*60*60*1000)-1;
mend = new Date(thisyear,thismonth,1);
days2 = (new Date(thisyear,thismonth,thisdate) - mend)/(24*60*60*1000)+1;
dayst = days1 + days2;
if (dayst >= DaysInMonth[smonth]) {
AddOneMonth = 1;
dayst -= DaysInMonth[smonth];
}
else AddOneMonth = 0;
ydiff1 = thisyear-mstart.getFullYear();
mdiff1 = thismonth-mstart.getMonth()+AddOneMonth;
if (mdiff1 >11) { mdiff1=0; ydiff1++; }
if (mdiff1 < 0) { mdiff1 = mdiff1 + 12; ydiff1--; }
temp = (ydiff1==0?""
ydiff1==1?ydiff1+" Jahr und ":ydiff1 + " Jahre, "));
temp += (mdiff1==0?"0 Monate und "
mdiff1==1?mdiff1+" Monat und ":mdiff1+" Monate und "));
temp += (dayst==0?"0 Tage"
dayst==1 ? " 1 Tag." : dayst + " Tage." ));
return temp;
}
</script>
<center><SCRIPT LANGUAGE="JavaScript">
document.write("<font face=Microsoft Sans Serif>");
document.write("<font size=2>");
document.write("<font color=#8B0000>");
document.write("Dieses RPG existiert schon ");
document.write("<font color=#8B0000>");
document.write(DateEstablished(02,01,2006));
document.write("</font>");
document.write("</font>");
document.write("</font>");
document.write("</font>");
document.write("</font>");
</script>
<br />
<br />
zeigt seit gestern folgendes an:
	
		
was natürlich ziemlich unschön ist...
ich weiß leider nicht mehr, wo ich es gefunden habe, aber vielleicht hat ja jemand eine Idee, woran das liegen könnte?
							
						
					folgender Code
<SCRIPT LANGUAGE="JavaScript">
function DateEstablished(startmonth, startdate, startyear) {
sdate=startdate;
smonth=startmonth-1;
syear=startyear;
var DaysInMonth = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
today = new Date()
var thisyear = today.getFullYear();
var thismonth = today.getMonth();
var thisdate = today.getDate();
mstart = new Date(syear,(smonth==12?1:smonth+1),1);
days1 = (mstart - new Date(syear,smonth,sdate))/(24*60*60*1000)-1;
mend = new Date(thisyear,thismonth,1);
days2 = (new Date(thisyear,thismonth,thisdate) - mend)/(24*60*60*1000)+1;
dayst = days1 + days2;
if (dayst >= DaysInMonth[smonth]) {
AddOneMonth = 1;
dayst -= DaysInMonth[smonth];
}
else AddOneMonth = 0;
ydiff1 = thisyear-mstart.getFullYear();
mdiff1 = thismonth-mstart.getMonth()+AddOneMonth;
if (mdiff1 >11) { mdiff1=0; ydiff1++; }
if (mdiff1 < 0) { mdiff1 = mdiff1 + 12; ydiff1--; }
temp = (ydiff1==0?""
ydiff1==1?ydiff1+" Jahr und ":ydiff1 + " Jahre, "));temp += (mdiff1==0?"0 Monate und "
mdiff1==1?mdiff1+" Monat und ":mdiff1+" Monate und "));temp += (dayst==0?"0 Tage"
dayst==1 ? " 1 Tag." : dayst + " Tage." ));return temp;
}
</script>
<center><SCRIPT LANGUAGE="JavaScript">
document.write("<font face=Microsoft Sans Serif>");
document.write("<font size=2>");
document.write("<font color=#8B0000>");
document.write("Dieses RPG existiert schon ");
document.write("<font color=#8B0000>");
document.write(DateEstablished(02,01,2006));
document.write("</font>");
document.write("</font>");
document.write("</font>");
document.write("</font>");
document.write("</font>");
</script>
<br />
<br />
zeigt seit gestern folgendes an:
			
			
				Dieses RPG existiert schon 1 Monat und 25.95833333333333 Tage.
			
		
	ich weiß leider nicht mehr, wo ich es gefunden habe, aber vielleicht hat ja jemand eine Idee, woran das liegen könnte?
							
						
          
 
 ... ich hoffe mal, ich habe mich jetzt klar genug ausgedrückt 
Kommentar