Here you can find the source of addMinutes(java.util.Date date, long... minutes)
public static java.util.Date addMinutes(java.util.Date date, long... minutes)
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static final int MINUTE = 2; public static java.util.Date addMinutes(java.util.Date date, long... minutes) { if (minutes == null) { return date; }// ww w .j av a 2 s .com java.util.Calendar c = java.util.Calendar.getInstance(); c.setTime(date); for (long minute : minutes) { c.add(Calendar.MINUTE, (int) minute); } return c.getTime(); } public static Date addMinutes(Date date, long minutes) { Calendar c = Calendar.getInstance(); c.setTimeInMillis(getMillis(date) + ((long) minutes) * 60 * 1000); return c.getTime(); } public static Date add(Date date, long minutes) { if (date == null) { throw new IllegalArgumentException(); } return addMinutes(date, minutes); } public static long getMillis(Date date) { Calendar c = Calendar.getInstance(); c.setTime(date); return c.getTimeInMillis(); } }