Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int vergleicheTermin(int index1,int index2){
- int ergebnis=0;
- int jahr1 = tlist[index1].j;
- int jahr2 = tlist[index2].j;
- int monat1 = tlist[index1].m;
- int monat2 = tlist[index2].m;
- int tag1 = tlist[index1].t;
- int tag2 = tlist[index2].t;
- int hh1 = tlist[index1].hh;
- int hh2 = tlist[index2].hh;
- int mm1 = tlist[index1].mm;
- int mm2 = tlist[index2].mm;
- if(jahr1<jahr2){ ergebnis=1; }
- if(jahr2>jahr2){ ergebnis=3; }
- if(jahr1==jahr2) {ergebnis=0; }
- if(monat1<monat2){ ergebnis=1; }
- if(monat2>monat2){ ergebnis=3; }
- if(monat1==monat2) {ergebnis=0; }
- if(tag1<tag2){ ergebnis=1; }
- if(tag2>tag2){ ergebnis=3; }
- if(tag1==tag2) {ergebnis=0; }
- if(hh1<hh2){ ergebnis=1; }
- if(hh2>hh2){ ergebnis=3; }
- if(hh1==hh2) {ergebnis=0; }
- if(mm1<mm2){ ergebnis=1; }
- if(mm2>mm2){ ergebnis=3; }
- if(mm1==mm2) {ergebnis=0; }
- return ergebnis;
- }
Add Comment
Please, Sign In to add comment