Android examples for java.util:Year
get Tomorrow in yyyy/MM/dd format
//package com.java2s; import android.annotation.SuppressLint; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.GregorianCalendar; public class Main { @SuppressLint("SimpleDateFormat") public static String getTomorrow() { Calendar cal = new GregorianCalendar(); cal.add(Calendar.DATE, 1); return new SimpleDateFormat("yyyy/MM/dd").format(cal.getTime()); }/* w w w.j a va 2 s. c o m*/ @SuppressLint("SimpleDateFormat") public static String getTomorrow(String strFormat) { Calendar cal = new GregorianCalendar(); cal.add(Calendar.DATE, 1); return new SimpleDateFormat(strFormat).format(cal.getTime()); } }