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