get Date Of 60 Days After - Android java.util

Android examples for java.util:Day

Description

get Date Of 60 Days After

Demo Code

import java.text.SimpleDateFormat;
import java.util.Date;

public class Main{
  public static final SimpleDateFormat yearFormat = new SimpleDateFormat(
      "yyyy-MM-dd");
    public static String getDateOf60DaysAfter() {
        long time = System.currentTimeMillis() + 60L * 24 * 60 * 60 * 1000;
        Date d = new Date(time);
        return yearFormat.format(d);
    }//from www.  j  a  v a2 s.  c om

}

Related Tutorials