List of utility methods to do Time Parse
boolean | isDatetimeParsable(String value) is Datetime Parsable try { return DATETIME_FORMATTER.parse(value) != null; } catch (ParseException e) { return false; |
boolean | isFromartDate(String time) is Fromart Date if (time != null) { String tmp = null; try { Format f = new SimpleDateFormat("yyyyMMdd"); Date d = (Date) f.parseObject(time); tmp = f.format(d); } catch (ParseException e) { e.printStackTrace(); ... |
boolean | isTime(final String date) Checks if is time. boolean result; try { TIME.parse(date); result = true; } catch (ParseException e) { result = false; return result; ... |
boolean | isTime(String timeStr) is Time SimpleDateFormat df = new SimpleDateFormat("hh:mm:ss"); Date date = null; try { date = df.parse(timeStr); } catch (ParseException e) { return false; return date != null; ... |
long | strtotime(String strtime) strtotime try { SimpleDateFormat format = new SimpleDateFormat(TIME_FORMAT); return format.parse(strtime).getTime(); } catch (ParseException e) { e.printStackTrace(); return 0; |