List of utility methods to do Day Add
String | addDayString5(Date date, int day) add Day String Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.add(Calendar.DATE, day);
return convertDate2String5(calendar.getTime());
|
String | addDayToString(String strDate, int days) add Day To String Calendar cale = toCalendar(strDate); cale.add(Calendar.DAY_OF_YEAR, days); return dateFormatterByPattern(cale.getTime(), "yyyy-MM-dd"); |
String | addOneDay(String strDate) add One Day int[] standardDays = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; int[] leapyearDays = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; int y = Integer.parseInt(strDate.substring(0, 4)); int m = Integer.parseInt(strDate.substring(4, 6)); int d = Integer.parseInt(strDate.substring(6, 8)) + 1; int maxDateCount = 0; System.out.println(y); System.out.println(m); ... |
String | addOneDayForamt(String date, String format, Integer addDate) add One Day Foramt Calendar calendar = Calendar.getInstance(); calendar.setTime(new SimpleDateFormat(format).parse(date)); calendar.add(Calendar.DATE, addDate); String retDate = new SimpleDateFormat(format).format(calendar.getTime()); return retDate; |
java.util.Date | AddUtilDate(String strDate, int iDays) Add Util Date DateFormat df = new SimpleDateFormat("yyyy-MM-dd"); Date d1 = df.parse(strDate); return AddDate(d1, iDays); |
String | getAddDay(int day) get Add Day String orgDate = null;
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DAY_OF_MONTH, day);
Date newDate = calendar.getTime();
orgDate = formatDate(newDate);
return orgDate;
|
Date | getFutrueDate(Date oldDate, int addDay) get Futrue Date Calendar c = Calendar.getInstance();
c.setTime(oldDate);
c.add(Calendar.DATE, addDay);
return c.getTime();
|