mardi 16 juin 2015

Calculate dd:hh::mm

This is the code that i'm using

if (notification.isTypenotif()) {
    float depassement = notification.getDepassement();
    int depM = (int) (depassement % 60);
    int depH = (int) (depassement / 60);
    int depd = (int) (depassement / 1440);
    tacheVO.setNotification(new String("Remaining :  " + depd + "j :"
                    + +depH + " h : " + depM + " min"));

} else {
    float depassement = notification.getDepassement()
                    + (float) projet.getDureeParDefaut();
    int depM = (int) (depassement % 60);
    int depH = (int) (depassement / 60);
    int depd = (int) (depassement / 1440);
    tacheVO.setNotification(new String("Overflow :  " + depd + "j :"
                    + +depH + " h : " + depM + " min"));
}

Aucun commentaire:

Enregistrer un commentaire