Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
java.util.Date dt = java.util.Calendar.getInstance().getTime();
long ddiff = 14 * 24 * 60 * 60 * 1000;
long past = dt.getTime() - ddiff;
dt = new java.util.Date( past);
System.out.println("14 days ago was: " + dt.toLocaleString());
import java.text.SimpleDateFormat;
import java.util.*;
import java.text.ParseException;
import java.text.DateFormat;
class FindStopDate
{
public static void main(String[] args) throws Exception
{
final int NUMBER_OF_DAYS_AGO = -14;
DateFormat format = new SimpleDateFormat("yyyy-mm-dd");
format.setLenient(true);
Calendar cal = Calendar.getInstance();
cal.setTime(new java.util.Date());
cal.add(Calendar.DATE, NUMBER_OF_DAYS_AGO);
String stopDate = DateFormat.getDateInstance().format(cal.getTime());
System.out.println(stopDate);
}
}