List of utility methods to do Date Long Format
Long | getLong(final Map map, final Object key) Gets a Long from a Map in a null-safe manner. Number answer = getNumber(map, key); if (answer == null) { return null; } else if (answer instanceof Long) { return (Long) answer; return new Long(answer.longValue()); |
String | getLongDate(Date date) get Long Date return (SIMPLE_DATE_FORMAT_LONG).format(date);
|
String | getLongDate(Date date) get Long Date if (null == date) return ""; return new String(LONG_FORMAT.format(date)); |
Long | getLongDateByMidformat(String dateStr) get Long Date By Midformat Date d; try { d = MID_FORMAT.parse(dateStr); return Long.valueOf(d.getTime()); } catch (ParseException e) { e.printStackTrace(); return new Date().getTime(); ... |
String | getLongDateCurr() get Long Date Curr DateFormat dateFormat = new SimpleDateFormat("MM/dd/yy HH:mm"); Date date = new Date(); dateFormat.setTimeZone(TimeZone.getTimeZone("GMT")); return dateFormat.format(date); |
String | getLongDateFormat(Date d) Get the date - throws an illegal state exception if it is not one of the acceptable date values. SimpleDateFormat longDateFormat = new SimpleDateFormat(longFormat); return longDateFormat.format(d); |
DateFormat | getLongDateFormatter() get Long Date Formatter return DateFormat.getDateInstance(DateFormat.LONG);
|
String | getLongDateStr(Date sDate) get Long Date Str if (sDate == null) return ""; return new SimpleDateFormat("yyyy-MM-dd kk:mm:ss").format(sDate); |
String | getLongDateString(Date date) yyyyMMddHHmmss DateFormat dateFormat = new SimpleDateFormat(longFormat); return formatDateString(date, dateFormat); |
String | getLongDateString(Date date) get Long Date String DateFormat dateFormat = new SimpleDateFormat(longFormat); return getDateString(date, dateFormat); |