List of utility methods to do Week Add
Date | addWeekDays(Date dt, int days) Add number of days to current Date and return the new Date. if (isWeekend(dt)) { dt = nextMonday(dt); Calendar cal = Calendar.getInstance(); cal.setTime(dt); if (days > 0) { for (int j = 1; j <= days; j++) { if (cal.get(Calendar.DAY_OF_WEEK) == Calendar.FRIDAY) { ... |
long | addWeeksToDate(long timeInMilis, int amount) add Weeks To Date Calendar calendar = Calendar.getInstance();
calendar.setTimeInMillis(timeInMilis);
calendar.add(Calendar.WEEK_OF_YEAR, amount);
return calendar.getTimeInMillis();
|