Date date=new Date(); SimpleDateFormat dateFm = new SimpleDateFormat("EEEE"); dateFm.format(date);
或
String[] weekDays = {"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"}; Calendar calendar = Calendar.getInstance(); calendar.setTime(dt);
int i = calendar.get(Calendar.DAY_OF_WEEK) - 1; if (i < 0){ i = 0;
} return weekDays[i];