List of utility methods to do Day Offset
String | getOffsetDayOffNow(int offset) get Offset Day Off Now Calendar c = Calendar.getInstance(); c.add(Calendar.DAY_OF_MONTH, offset); return new SimpleDateFormat("yyyy-MM-dd 00:00:00").format(c.getTime()); |
int | getOffsetDays(String strDate, String strDate2, String pFormat) get Offset Days SimpleDateFormat fmt = new SimpleDateFormat(pFormat); SimpleDateFormat fmt2 = new SimpleDateFormat(pFormat); Date param_date1 = fmt.parse(strDate); Date param_date2 = fmt2.parse(strDate2); return getOffsetDays(param_date1, param_date2); |