public static String getLastDay() { SimpleDateFormat sm = new SimpleDateFormat("yyyy-MM-dd"); Calendar calast = Calendar.getInstance(); calast.set(Calendar.DAY_OF_MONTH, calast.getActualMaximum(Calendar.DAY_OF_MONTH)); String last = sm.format(calast.getTime()); return last; }