Here you can find the source of getDateTimeAfter(final Date _from, final int _time_type, final int _count)
public static Date getDateTimeAfter(final Date _from, final int _time_type, final int _count)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; public class Main { public static Date getDateTimeAfter(final Date _from, final int _time_type, final int _count) { final Calendar c = Calendar.getInstance(); if (_from != null) { c.setTime(_from);/*from w w w .j a v a2 s.c o m*/ } c.add(_time_type, _count); return c.getTime(); } }