hallo, warum geht nicht diese methode? wo ist fehler?
Java:
public static int berechneTage(int t, int m, int j)
{
int t2=1;
int m2=1;
int j2=1582;
int tage=0;
while (!(t2 == t && m2 == m && j2 == j)) {
tage++;
t2++;
if(isSchaltjahr(j2) && m2==2)
tage += 29;
else if(!isSchaltjahr(j2) && m2==2)
tage += 28;
else{
if(m2%2==0)
tage += 30;
else{
tage += 31;
}
}}
return tage;
}