Java Utililty Methods Today

List of utility methods to do Today

Description

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

Method

longgetToday()
get Today
Calendar cal = Calendar.getInstance();
String curDate = dateFormater2.get().format(cal.getTime());
curDate = curDate.replace("-", "");
return Long.parseLong(curDate);
DategetToday()
get Today
return formatDate(new Date());
StringgetToday()
get Today
String day = "", month = "", year = "";
Calendar current_cal = Calendar.getInstance();
int mm = (current_cal.get(Calendar.MONTH) + 1);
int dd = current_cal.get(Calendar.DATE);
year = "" + current_cal.get(Calendar.YEAR);
if (mm < 10)
    month = "0";
month += mm;
...
java.util.DategetToday()
getToday: returns today
return truncateToDay(new Date());
StringgetToday()
get Today
return new SimpleDateFormat("yyyy-MM-dd").format(new Date());
StringgetToday()
get Today
return getDate(0);
DategetToday()
get Today
if (testToday != null)
    return testToday;
return new Date(System.currentTimeMillis());
CalendargetToday()
get Today
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
return calendar;
StringgetToday()
get Today
return getDate(0);
CalendargetToday()
get Today
return Calendar.getInstance();