Java Week Calculate nextWeek(Date date, int week)

Here you can find the source of nextWeek(Date date, int week)

Description

next Week

License

Apache License

Declaration

public static Date nextWeek(Date date, int week) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.*;

public class Main {

    public static Date nextWeek(Date date, int week) {
        Calendar cal = Calendar.getInstance();
        if (date != null) {
            cal.setTime(date);/*w  w w .j  a  va2s  .  c o m*/
        }
        cal.add(Calendar.WEEK_OF_MONTH, week);
        return cal.getTime();
    }
}

Related

  1. getWeekOfDate(Date date)
  2. getWeekOfYear(Date date, Locale locale)
  3. getWeeksAddCount(int repType, int repIndex)
  4. getWeeksInYear(int year)
  5. isSameWeekDates(Date date1, Date date2)
  6. nextWeek(long date)
  7. plusHour(Date date, int plusWeek)
  8. startOfWeek(Date datum)
  9. weekCal(int weekNumber)