List of utility methods to do Date Yesterday Get
String | getyesterday(String today) getyesterday String subYear = today.substring(0, 4); String subMonth = today.substring(5, 7); String subDay = today.substring(8, 10); Long LongDay = new Long(subDay); long longDay = LongDay.longValue(); if (longDay != 1) { longDay--; String yesterday; if (longDay < 10) { yesterday = subYear + "-" + subMonth + "-" + "0" + longDay; } else { yesterday = subYear + "-" + subMonth + "-" + longDay; return yesterday; |