List of utility methods to do Date Now
boolean | currentAfterDay(Date date) current After Day Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); Calendar current = Calendar.getInstance(); current.set(Calendar.HOUR_OF_DAY, 0); ... |
String | currentDate() Get todays date in string form WITHOUT a time-stamp Calendar cal = Calendar.getInstance(); SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_DAY); return sdf.format(cal.getTime()); |
String | currentDate() current Date return dateFormat.format(now());
|
Date | currentDate() current Date return Calendar.getInstance().getTime();
|
Date | currentDate() Returns the current date at midnight (hours, minutes and seconds are omitted). Calendar cal = Calendar.getInstance();
cal.set(Calendar.HOUR, 0);
cal.set(Calendar.MINUTE, 0);
cal.set(Calendar.SECOND, 0);
return cal.getTime();
|
Date | currentDate() current Date Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(System.currentTimeMillis()); calendar.set(Calendar.HOUR, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); return new Date(calendar.getTimeInMillis()); |
String | currentDate() Returns the current date formatted as EXIF timestamp. return new SimpleDateFormat("yyyy:MM:dd HH:mm:ss", Locale.UK).format(Calendar.getInstance().getTime()); |
String | currentDate() Formats the current date. return dateToString(System.currentTimeMillis());
|
String | currentDate() current Date return dateFormat.format(now());
|
String | currentDate() current Date SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); return dateFormat.format(new Date()); |