Java Day of Week incWeek(java.util.Date date, int amount, Locale locale)

Here you can find the source of incWeek(java.util.Date date, int amount, Locale locale)

Description

inc Week

License

Open Source License

Declaration

public static java.util.Date incWeek(java.util.Date date, int amount, Locale locale) 

Method Source Code


//package com.java2s;
/*//from  w  ww .ja va  2s .c  o  m
 * ScheduleDateTimeUtils.java
 *
 * Copyright (c) 1998 - 2006 BusinessTechnology, Ltd.
 * All rights reserved
 *
 * This program is the proprietary and confidential information
 * of BusinessTechnology, Ltd. and may be used and disclosed only
 * as authorized in a license agreement authorizing and
 * controlling such use and disclosure
 *
 * Millennium Business Suite Anywhere System.
 *
 */

import java.util.Calendar;
import java.util.Locale;

public class Main {

    public static java.util.Date incWeek(java.util.Date date, int amount, Locale locale) {
        Calendar calendar = Calendar.getInstance(locale);
        calendar.setTime(date);
        calendar.add(Calendar.WEEK_OF_MONTH, amount);
        return calendar.getTime();
    }
}

Related

  1. getWeekStart(Date date)
  2. getWeekStart(Date date)
  3. getWeekStartDateBeforeCurrent(int weekNum, Date current)
  4. getWeekth(String sDate)
  5. getYearOfWeek(Date date)
  6. isMatchWeek(Date date, int week)
  7. isOnWeekend(Date date)
  8. isSameWeekDates(Date date1, Date date2)
  9. isWeekday(Date startDate)