/**
*获取今天是星期几
* @return
*/
public static Integer getDayOfWeek(){
Calendar calendar = Calendar.getInstance();
return calendar.get(DAY_OF_WEEK) - 1;
}
/**
* 获取指定时间戳是星期几
* @param time
* @return
*/
public static Integer getDayOfWeekByTime(Integer time){
Calendar calendar = Calendar.getInstance();
long longTimeStamp = time * 1000L;
Date date = new Date(longTimeStamp);
calendar.setTime(date);
return calendar.get(DAY_OF_WEEK) - 1;
}