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