List of utility methods to do Date Now
String | getCurrentStringDate(String pattern) get Current String Date Date currentTime = new Date(); SimpleDateFormat formatter = new SimpleDateFormat(pattern); return formatter.format(currentTime); |
String | getCurrentStringDateYMD() get Current String Date YMD return getCurrentStringDate(PATTERN_YYYYMMDD);
|
String | getCurrentStrTimeMills() get Current Str Time Mills return getCurrentStrTime("yyyy-MM-dd HH:mm:ss:SSS"); |
long | getCurrentTime() get Current Time try { return new java.text.SimpleDateFormat(FMT_LONG_TIME).parse(getCurrentDate(FMT_LONG_TIME)).getTime() / 1000; } catch (Exception e) { e.printStackTrace(); return 0L; |
long | getCurrentTime() get Current Time return (new Date()).getTime(); |
String | getCurrentTime() get Current Time java.util.Calendar cal = java.util.Calendar.getInstance(); return new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(cal.getTime()); |
String | getCurrentTime() get Current Time SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); Date date = new Date(System.currentTimeMillis()); return sdf.format(date); |
String | getCurrentTime() Returns current time in format of ISO8601:2000(YYYY-MM-DDTHH:MM:SS). return df.format(new Date()); |
String | getCurrentTime() get Current Time return dateFormatting.format(calendar.getTime());
|
String | getCurrentTime() get Current Time if (_currentDate != null) { _currentDate.setTime(System.currentTimeMillis()); } else { _currentDate = new Date(); if (_dateFormat == null) { _dateFormat = new SimpleDateFormat("MMM-dd-yyyy__hh-mm-ssa"); return _dateFormat.format(_currentDate); |