Here you can find the source of addMinTime(long time, String addMin)
public static String addMinTime(long time, String addMin)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.*; public class Main { public static String addMinTime(long time, String addMin) { if (addMin.contains("m")) { addMin = addMin.replace("m", ""); }//from w w w . j a v a 2 s . c o m long ad = Long.valueOf(addMin); long i = ad * 60 * 1000; return getDateByLongTime(time + i); } public static String getDateByLongTime(long time) { SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss"); Date dt = new Date(time); String timeStr = sdf.format(dt); return timeStr; } }