Guest User

Untitled

a guest
Oct 17th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. class Dateutil {
  2.  
  3. /**
  4. * add's n Days to a given Date
  5. *
  6. * @param d - date
  7. * @param n - number of Days which should be added
  8. * @return
  9. */
  10. public static Date add(Date d, int n) {
  11. Calendar cal = Calendar.getInstance();
  12. cal.setTime(d);
  13. cal.add(Calendar.DATE, n);
  14. Date ret = cal.getTime();
  15. return ret;
  16. }
  17. }
Add Comment
Please, Sign In to add comment