Java Utililty Methods Now

List of utility methods to do Now

Description

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

Method

Datenow()
Returns the current system date
return new Date();
Stringnow()
Get today date and current time in format: yyyyMMdd_HHmm.
final Calendar calendar = Calendar.getInstance();
final SimpleDateFormat formatter = new SimpleDateFormat(FORMAT);
return formatter.format(calendar.getTime());
longnow()
now
return System.currentTimeMillis();
Stringnow()
now
Date d = new Date();
DateFormat df = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM);
return df.format(d);
Stringnow()
now
return new SimpleDateFormat(DATE_FORMAT_NOW, DATE_LOCALE).format(Calendar.getInstance().getTime());
Stringnow()
now
return formatTime(today());
Stringnow()
now
return datetimeToStr(new Date());
Stringnow()
now
String now = dateFormat.format(new Date());
now = now.substring(0, 26) + ":" + now.substring(26, 28);
return now;
Stringnow()
Get current date and time formatted as ISO 8601 string.
return fromCalendar(GregorianCalendar.getInstance());
Stringnow()
now
return dateToString(new Date());