List of utility methods to do Today Get
long | getToday() get Today Calendar cal = Calendar.getInstance(); String curDate = dateFormater2.get().format(cal.getTime()); curDate = curDate.replace("-", ""); return Long.parseLong(curDate); |
String | getLastyearToday(String str) get Lastyear Today String subYear = str.substring(0, 4); String subMonth = str.substring(5, 7); String subDay = str.substring(8, 10); Long LongYear = new Long(subYear); long longYear = LongYear.longValue(); longYear--; lastYearToday = longYear + "-" + subMonth + "-" + subDay; return lastYearToday; ... |
String | getTodayFull() get Today Full Calendar cal = Calendar.getInstance(); java.text.SimpleDateFormat sdf = new SimpleDateFormat( "yyyy-MM-dd 00:00:00"); String cdate = sdf.format(cal.getTime()); return cdate; |
boolean | isToday(Calendar today, Calendar date) is Today if (date == null) { return true; Calendar otherday = getCalendar(); otherday.setTime(date.getTime()); return otherday.get(Calendar.YEAR) == today.get(Calendar.YEAR) && otherday.get(Calendar.MONTH) == today .get(Calendar.MONTH) ... |
boolean | isToday(Calendar date) is Today Calendar today = getCalendar();
return isToday(today, date);
|
int | getNbDaysToDate(Calendar from, int toYear, int toMonth, int toDay) get Nb Days To Date stripTime(from); int todayJulianDay = getJulianDay(from); Calendar eventCal = Calendar.getInstance(); eventCal.set(Calendar.YEAR, toYear); eventCal.set(Calendar.MONTH, toMonth); eventCal.set(Calendar.DAY_OF_MONTH, toDay); stripTime(eventCal); int eventJulianDay = getJulianDay(eventCal); ... |
boolean | isToday(long time) is Today GregorianCalendar calendar = (GregorianCalendar) Calendar .getInstance(); calendar.setTimeInMillis(System.currentTimeMillis()); int systemDay = calendar.get(Calendar.DAY_OF_MONTH); int systemMonth = calendar.get(Calendar.MONTH); int systemYear = calendar.get(Calendar.YEAR); calendar.setTimeInMillis(time); int day = calendar.get(Calendar.DAY_OF_MONTH); ... |
Date | today() today return Calendar.getInstance().getTime();
|
String | today() today return getAsString(Calendar.getInstance());
|
boolean | isToday(long lTime) is Today return isDateDayEqual(lTime, System.currentTimeMillis());
|