Java Utililty Methods Week Add

List of utility methods to do Week Add

Description

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

Method

DateaddWeekDays(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) {
...
longaddWeeksToDate(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();