List of utility methods to do Date Add
Timestamp | addMilliseconds(Date date, int amount) add Milliseconds return add(date, Calendar.MILLISECOND, amount);
|
Date | addMilliseconds(Date date, int amount) Adds a number of milliseconds to a date returning a new object. return add(date, Calendar.MILLISECOND, amount);
|
Date | addMinuteToDate(Date date, int minutesToBeAdded) Add / Subtract given no of minutes to Date . if (StringUtils.isNull(date)) { throw new NullPointerException("date cannot be null"); return add(date, Calendar.MINUTE, minutesToBeAdded); |
Timestamp | addMinutes(Date date, int amount) add Minutes return add(date, Calendar.MINUTE, amount);
|
Date | addMinutes(Date date, int amount) Adds a number of minutes to a date returning a new object. return add(date, Calendar.MINUTE, amount);
|
Timestamp | addMonths(Date date, int amount) add Months return add(date, Calendar.MONTH, amount);
|
Date | addMonths(Date date, int amount) Adds a number of months to a date returning a new object. return add(date, Calendar.MONTH, amount);
|
Date | addMonthsToDate(Date date, int monthsToBeAdded) Add / Subtract given no of months to Date . if (StringUtils.isNull(date)) { throw new NullPointerException("date cannot be null"); return add(date, Calendar.MONTH, monthsToBeAdded); |
Timestamp | addSeconds(Date date, int amount) add Seconds return add(date, Calendar.SECOND, amount);
|
Date | addSeconds(Date date, int amount) Adds a number of seconds to a date returning a new object. return add(date, Calendar.SECOND, amount);
|