public static int getDutyDays(java.util.Date startDate,java.util.Date endDate) {
int result = 0;
java.text.SimpleDateFormat df = new java.text.SimpleDateFormat("yyyy-MM-dd");
while (startDate.compareTo(endDate) <= 0) {
if (startDate.getDay() != 6 && startDate.getDay() != 0)
result++;
startDate.setDate(startDate.getDate() + 1);
}
return result;
}