Java tutorial
//package com.java2s; import java.util.Calendar; public class Main { private static Calendar add(long time, int val, int field) { Calendar c = Calendar.getInstance(); c.setTimeInMillis(time); c.add(field, val); return c; } }