List of utility methods to do Yesterday Get
String | getYestoday(String sourceDate, String format) get Yestoday return getFormatDateAdd(getDateFromString(sourceDate, format), -1,
format);
|
String | getYestoday(String sourceDate, String format) get Yestoday return getFormatDateAdd(getDateFromString(sourceDate, format), -1,
format);
|
String | getFormatYestoday(String format) get Format Yestoday return getFormatCurrentAdd(-1, format);
|
boolean | isYesterday(long date) Checks if the given date is yesterday. final Calendar currentDate = Calendar.getInstance(); currentDate.setTimeInMillis(date); final Calendar yesterdayDate = Calendar.getInstance(); yesterdayDate.add(Calendar.DATE, -1); return yesterdayDate.get(Calendar.YEAR) == currentDate .get(Calendar.YEAR) && yesterdayDate.get(Calendar.DAY_OF_YEAR) == currentDate .get(Calendar.DAY_OF_YEAR); ... |
String | getYesterdayFormattedTime() get Yesterday Formatted Time Calendar calendar = getCurrentCalendar(); calendar.add(Calendar.HOUR_OF_DAY, -9); calendar.add(Calendar.DAY_OF_MONTH, -1); SimpleDateFormat format = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ssz"); String result = format.format(calendar.getTime()); String standardName = ""; if (result.contains("JST")) { ... |
Date | getYesterday() get Yesterday Date today = getToday(); Date yesterday = new Date(today.getYear(), today.getMonth(), today.getDate() - 1); return yesterday; |