Here you can find the source of addMinutesToDate(Date initialDateInMillis, Integer minutesToAdd)
public static Long addMinutesToDate(Date initialDateInMillis, Integer minutesToAdd)
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { public static Long addMinutesToDate(Date initialDateInMillis, Integer minutesToAdd) { Calendar cal = Calendar.getInstance(); cal.setTime(initialDateInMillis); cal.add(Calendar.MINUTE, minutesToAdd); return cal.getTimeInMillis(); }// w w w .j av a 2s . c o m public static Long addMinutesToDate(Long initialDateInMillis, Integer minutesToAdd) { Calendar cal = Calendar.getInstance(); cal.setTime(new Date(initialDateInMillis)); cal.add(Calendar.MINUTE, minutesToAdd); return cal.getTimeInMillis(); } }