| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 
 |     private int get_NbreJourOuvrable(){
           // Date date_Ouv = (Date)Date.fromText(dat_Debut, "dd/mm/yyyy", "");
           // Date date_Fin = (Date)Date.fromText(dat_Fin, "dd/mm/yyyy", "");
         //   int count = 0;
            new Thread(new Runnable(){
                public void run(){
                    Date date_Ouv = (Date)Date.fromText("01/01/2002", "dd/mm/yyyy", "");
                    Date date_Fin = (Date)Date.fromText("18/02/2009", "dd/mm/yyyy", "");                    
                    if (date_Ouv.compareTo(date_Fin) > 0) {
                        count = -1;            
                    }
                    while (date_Ouv.compareTo(date_Fin) <= 0) {
                        if (!mDBaccess.EstJourFerie(date_Ouv) && !mDBaccess.EstJourWeekEnd(date_Ouv)) {
                                count++; 
                                date_Ouv = mDBaccess.AjouterJoursADate(date_Ouv, 1);                        
                        } else  date_Ouv = mDBaccess.JourOuvrableApres(date_Ouv);               
                    }
                }}
            ).start();
            System.out.println(" count :" + count);
            return count;
    } | 
Partager