List of utility methods to do Time Now
String | getNowOfDateByFormat(String format) get Now Of Date By Format Date d = new Date(); SimpleDateFormat sdf = new SimpleDateFormat(format); String dateStr = sdf.format(d); return dateStr; |
String | getNowPatch() this is a fix for all strange date format; it returns the NOW value. java.util.Date d = new java.util.Date(System.currentTimeMillis()); DateFormat utcf = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss Z", Locale.US); String out = utcf.format(d); return out; |
String | getNowSinceHour() get Now Since Hour Date now = new Date(); return getNowSinceHour(now); |
String | getNowStr() get current date and time string return format(new Date(), FORMAT_DATE_TIME); |
String | getNowStr() get Now Str return dateToStr();
|
String | getNowStr() get Now Str return dateTimeFormatter2.format(new Date()); |
String | getNowStrDateVerbose() Gets "now" in verbose format. SimpleDateFormat df = new SimpleDateFormat("yyyy.MMMMM.dd hh:mm:ss aaa z"); Calendar opDate = Calendar.getInstance(); df.setTimeZone(DEFAULT_TIME_ZONE); return df.format(opDate.getTime()); |
String | getNowString() returns Now in String (HHMM format) return getTodayInFormat("HHmm"); |
String | getNowString() return a string of todays date time suitable this is in more international form that the version above SimpleDateFormat sdf = new SimpleDateFormat("dd MMM yyyy HH:mm:ss"); final String dateText = sdf.format(new Date()); return dateText; |
String | getNowString(String pattern) get Now String return getDateFormat(pattern).format(getNow());
|