Here you can find the source of after(Calendar c, long offset)
public static Calendar after(Calendar c, long offset)
//package com.java2s; import java.util.Calendar; public class Main { public static Calendar after(Calendar c, long offset) { Calendar calendar = null; if (c != null) { calendar = c;/* www.ja v a2s . c o m*/ } else { calendar = Calendar.getInstance(); } calendar.setTimeInMillis(calendar.getTimeInMillis() - offset); return calendar; } }