Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Dateutil {
- /**
- * add's n Days to a given Date
- *
- * @param d - date
- * @param n - number of Days which should be added
- * @return
- */
- public static Date add(Date d, int n) {
- Calendar cal = Calendar.getInstance();
- cal.setTime(d);
- cal.add(Calendar.DATE, n);
- Date ret = cal.getTime();
- return ret;
- }
- }
Add Comment
Please, Sign In to add comment