List of utility methods to do Time Add
Date | addTimeByDate(int dateNum, Date date) add Time By Date Calendar calendar = new GregorianCalendar(); calendar.setTime(date); calendar.add(Calendar.DATE, dateNum); return date = calendar.getTime(); |
Date | addTimeIntervals(Date date, int type, int num) add Time Intervals if (date == null) throw new IllegalArgumentException(); Calendar c = Calendar.getInstance(); c.setTime(date); c.add(type, num); return c.getTime(); |