private final static SimpleDateFormat sdfDay = new SimpleDateFormat( <span style="white-space:pre"> </span>"yyyy-MM-dd"); public static String dayForWeek(String pTime) throws ParseException{ Calendar c = Calendar.getInstance(); c.setTime(sdfDay.parse(pTime)); Date date = c.getTime(); //中文周几 SimpleDateFormat sdf = new SimpleDateFormat("E"); String dateStr = sdf.format(date); //数字周几 // int dayForWeek = 0; // if(c.get(Calendar.DAY_OF_WEEK) == 1){ // dayForWeek = 7; // }else{ // dayForWeek = c.get(Calendar.DAY_OF_WEEK) - 1; // } return dateStr; }