获取指定日期的下一天日期

Calendar c = Calendar.getInstance(); 
Date date = null; 
try { 
	date = new SimpleDateFormat("yy-MM-dd").parse("2013-07-19"); 
} 
catch (ParseException e) { 
	e.printStackTrace(); 
} 
c.setTime(date); 
int day = c.get(Calendar.DATE); 
c.set(Calendar.DATE,day+1); 

String dayAfter = new SimpleDateFormat("yyyy-MM-dd").format(c.getTime()); 
System.out.println(dayAfter); 

参考网址: http://www.jb51.net/article/26236.htm

你可能感兴趣的:(Java)