Guest User

Untitled

a guest
May 16th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.89 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.        
  18.         if(ergebnis==0){
  19.         if(monat1<monat2){ ergebnis=1; }
  20.         if(monat2>monat2){ ergebnis=3;  }
  21.         }
  22.        
  23.         if (ergebnis==0){
  24.         if(tag1<tag2){ ergebnis=1; }
  25.         if(tag2>tag2){ ergebnis=3;  }
  26.         }
  27.  
  28.         if(ergebnis==0){
  29.         if(hh1<hh2){ ergebnis=1; }
  30.         if(hh2>hh2){ ergebnis=3;  }
  31.         }
  32.  
  33.         if(ergebnis==0){
  34.         if(mm1<mm2){ ergebnis=1; }
  35.         if(mm2>mm2){ ergebnis=3;  }
  36.         }
  37.  
  38.  
  39.         return ergebnis;
  40.        
  41.        
  42.        
  43.        
  44.     }
Add Comment
Please, Sign In to add comment