List of utility methods to do Today
Date | today() Returns a trimmed version of today's date return trimDate(new Date()); |
Date | today() Returns a date with the current day (no time). return stripTime(now());
|
Date | today() today return truncate(new Date()); |
Date | today() today java.util.Calendar now = java.util.Calendar.getInstance();
return dateForYMDHMS(now.get(java.util.Calendar.YEAR), now.get(java.util.Calendar.MONTH) + 1,
now.get(java.util.Calendar.DATE), 0, 0, 0);
|
Date | today() today Calendar date = Calendar.getInstance();
date.set(Calendar.HOUR_OF_DAY, 0);
date.set(Calendar.MINUTE, 0);
date.set(Calendar.SECOND, 0);
date.set(Calendar.MILLISECOND, 0);
return date.getTime();
|
String | today() today DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); Date date = new Date(); return dateFormat.format(date); |
Date | today() today return parse(format(new Date(), webFormat), webFormat); |
Date | today() today final Calendar calendar = Calendar.getInstance(); calendar.setTime(new Date()); calendar.set(Calendar.HOUR, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); return calendar.getTime(); |
Calendar | today() today return Calendar.getInstance();
|
Date | toDay() to Day return removeTime(new Date()); |