Guest User

Untitled

a guest
May 16th, 2018
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.91 KB | None | 0 0
  1. public int vergleicheTermin(int index1,int index2){
  2.        
  3.         int ergebnis=0;
  4.         int jahr1 = tlist[index1].j;
  5.         int jahr2 = tlist[index2].j;
  6.         int monat1 = tlist[index1].m;
  7.         int monat2 = tlist[index2].m;
  8.         int tag1 = tlist[index1].t;
  9.         int tag2 = tlist[index2].t;
  10.         int hh1 = tlist[index1].hh;
  11.         int hh2 = tlist[index2].hh;
  12.         int mm1 = tlist[index1].mm;
  13.         int mm2 = tlist[index2].mm;
  14.        
  15.         if(jahr1<jahr2){ ergebnis=1; }
  16.         if(jahr2>jahr2){ ergebnis=3;  }
  17.         if(jahr1==jahr2) {ergebnis=0; }
  18.         if(monat1<monat2){ ergebnis=1; }
  19.         if(monat2>monat2){ ergebnis=3;  }
  20.         if(monat1==monat2) {ergebnis=0; }
  21.         if(tag1<tag2){ ergebnis=1; }
  22.         if(tag2>tag2){ ergebnis=3;  }
  23.         if(tag1==tag2) {ergebnis=0; }
  24.         if(hh1<hh2){ ergebnis=1; }
  25.         if(hh2>hh2){ ergebnis=3;  }
  26.         if(hh1==hh2) {ergebnis=0; }
  27.         if(mm1<mm2){ ergebnis=1; }
  28.         if(mm2>mm2){ ergebnis=3;  }
  29.         if(mm1==mm2) {ergebnis=0; }
  30.                
  31.         return ergebnis;
  32.        
  33.        
  34.        
  35.        
  36.     }
Add Comment
Please, Sign In to add comment