Here you can find the source of getDateBeforeSomeMinutes(int minute, long timestamp)
public final static long getDateBeforeSomeMinutes(int minute, long timestamp)
//package com.java2s; //License from project: Artistic License import java.util.Calendar; public class Main { public final static long getDateBeforeSomeMinutes(int minute, long timestamp) { Calendar c = Calendar.getInstance(); c.setTimeInMillis(timestamp);//from ww w .j a v a2 s. c o m c.add(Calendar.MINUTE, minute); return c.getTimeInMillis(); } }