Java tutorial
//package com.java2s; import java.util.Calendar; public class Main { public static long getMinTimeStampForIgMedia() { Calendar rightNow = Calendar.getInstance(); rightNow.add(Calendar.DAY_OF_YEAR, -2); return rightNow.getTimeInMillis() / 1000; } }