public int checaDia(int diaTemp) {
        int ultimoDiaMes[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
        if (diaTemp > 0 && diaTemp <= ultimoDiaMes[mes]) {
            return diaTemp;
        } else if ((mes == 2 && diaTemp == 29) && (ano % 400 == 0) || ((ano % 4 == 0) && (ano % 100 != 0))) {
            return diaTemp;
        } else {
            return -1;
        }
    }