Android Utililty Methods Date Yesterday Get

List of utility methods to do Date Yesterday Get

Description

The list of methods to do Date Yesterday Get are organized into topic(s).

Method

Stringgetyesterday(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;