Here you can find the source of toNextDayYMD()
public static String toNextDayYMD()
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Calendar; public class Main { public static String toNextDayYMD() { final Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.DATE, -1); return new SimpleDateFormat("yyyyMMdd").format(calendar.getTime()); }//from w w w .j a va 2 s. co m }