获取前n天的日期
public static String getNextFewDays(String currentDateString,
Integer offsetDays) {
Date tempdate = null;
try {
tempdate = new SimpleDateFormat().parse(currentDateString);
} catch (ParseException e) {
e.printStackTrace();
}
for (int i = 0; i < offsetDays; i++) {
Calendar cale = Calendar.getInstance();
cale.setTime(tempdate);
cale.add(Calendar.DATE, -1);
tempdate = cale.getTime();
}
return new SimpleDateFormat().format(tempdate);
}