Here you can find the source of addToCurrent(int type, int i)
public static long addToCurrent(int type, int i)
//package com.java2s; import java.util.Calendar; public class Main { public static long addToCurrent(int type, int i) { Calendar calendar = Calendar.getInstance(); calendar.add(type, i);//from w w w . j av a2 s .c o m return calendar.getTimeInMillis(); } }