Here you can find the source of add(Date actual, Integer type, Integer count)
public static Date add(Date actual, Integer type, Integer count)
//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(); } }