/**
* 当前日期的以后三年
* @throws ParseException
*/
public Date hou() throws ParseException{
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");//用来转换时间戳
Date curdate = DateUtils.add(new Date(), 1, 3);
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
String s = simpleDateFormat.format(curdate);
Date date=new Date();
date = format.parse(s);
return date;
} |