private int getWeekDay()
{
final int days[] = { 7, 1, 2, 3, 4, 5,6};
Calendar calendar = Calendar.getInstance();
Date date = new Date();
calendar.setTime(date);
int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
return days[dayOfWeek -1];
}
/***
* 获取除当天外其余的礼拜数组
* @return
*/
private void getWeekDayStringList()
{
int day = getWeekDay();
//除去当天
// dayNames.remove(day - 1);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(int i = 0;i<7;i++)
{
Calendar c = Calendar.getInstance();
c.add(Calendar.DATE, i-(day -1));
System.out.println("-------------"+sdf.format(c.getTime()));
}
}