Java Date Add add(Date actual, Integer type, Integer count)

Here you can find the source of add(Date actual, Integer type, Integer count)

Description

add

License

Apache License

Declaration

public static Date add(Date actual, Integer type, Integer count) 

Method Source Code

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

import java.util.Calendar;
import java.util.Date;

public class Main {
    public static Date add(Date actual, Integer type, Integer count) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(actual);//from  w  ww . j  av a2  s .  com
        calendar.add(type, count);
        return calendar.getTime();
    }
}

Related

  1. add(Date date, int calendarField, int amount)
  2. add(Date date, int calendarField, int amount)
  3. add(Date date, int calendarField, int amount)
  4. add(Date date, int field, int amount)