public int getDayOfWeek(Date date) {
Calendar c = Calendar.getInstance();
c.setTime(date);
int d = c.get(Calendar.DAY_OF_WEEK) - 1;
if (d == 0) {
return 7;
}
return d;
}
时间: 2024-10-12 03:54:30
public int getDayOfWeek(Date date) {
Calendar c = Calendar.getInstance();
c.setTime(date);
int d = c.get(Calendar.DAY_OF_WEEK) - 1;
if (d == 0) {
return 7;
}
return d;
}