时间加减分钟
/**
* 时间加减分钟
* @param startDate 要处理的时间,Null则为当前时间
* @param minutes 加减的分钟
* @return
*/
public static Date dateAddMinutes(Date startDate, int minutes) {
if (startDate == null) {
startDate = new Date();
}
Calendar c = Calendar.getInstance();
c.setTime(startDate);
c.set(Calendar.MINUTE, c.get(Calendar.MINUTE) + minutes);
return c.getTime();
}