Java Utililty Methods Month Get

List of utility methods to do Month Get

Description

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

Method

StringgetYesterdayOnLastMonth(String yesterday)
get Yesterday On Last Month
String ntime = "";
try {
    SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
    Date startDate = df.parse(yesterday);
    Date endDate = null;
    endDate = new Date(startDate.getTime() - (((long) 30 * (long) 24 * (long) 3600 * (long) 1000)));
    ntime = endDate.getYear() + 1900 + "-" + (endDate.getMonth() + 1) + "-" + endDate.getDate();
} catch (Exception e) {
...
StringgetYestMonth()
/
return new SimpleDateFormat(YYYY_MM).format(new Date());