List of utility methods to do Today
long | getToday() get Today Calendar cal = Calendar.getInstance(); String curDate = dateFormater2.get().format(cal.getTime()); curDate = curDate.replace("-", ""); return Long.parseLong(curDate); |
Date | getToday() get Today return formatDate(new Date()); |
String | getToday() 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.Date | getToday() getToday: returns today return truncateToDay(new Date()); |
String | getToday() get Today return new SimpleDateFormat("yyyy-MM-dd").format(new Date()); |
String | getToday() get Today return getDate(0);
|
Date | getToday() get Today if (testToday != null) return testToday; return new Date(System.currentTimeMillis()); |
Calendar | getToday() 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;
|
String | getToday() get Today return getDate(0);
|
Calendar | getToday() get Today return Calendar.getInstance();
|