public String getNextDay(String startdate) throws ParseException{ Date date = (new SimpleDateFormat("yyyy-MM-dd")).parse(startdate); Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.add(Calendar.DATE,1); date =cal.getTime(); startda…
//js获取当前日期.当前日期前.后N天的标准年月日 //day=0为当前天,day=7为前7天,day=-7为当前日期的后7天 function getstartdate(day) { var beginDate; var curr_time = new Date(); var week_time = new Date(curr_time.getTime() - 1000 * 60 * 60 * 24 * day); …
Learn From:http://blog.csdn.net/sunhuwh/article/details/39161323 public class CalendarTest { public static void main(String[] args) { // 获取当前年份.月份.日期 Calendar cale = null; cale = Calendar.getInstance(); int year = cale.get(Calendar.YEAR); int month =…