Java Utililty Methods Time Add

List of utility methods to do Time Add

Description

The list of methods to do Time Add are organized into topic(s).

Method

DateaddTimeByDate(int dateNum, Date date)
add Time By Date
Calendar calendar = new GregorianCalendar();
calendar.setTime(date);
calendar.add(Calendar.DATE, dateNum);
return date = calendar.getTime();
DateaddTimeIntervals(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();