List of utility methods to do Parse Date Pattern YYYY
Date | parseCompactDate(String exp) parse Compact Date return COMPACT_DATE.parse(exp);
|
Date | parseCoTDate(String dateString) parse Co T Date if (!dateString.isEmpty()) { DateFormat formatter1 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SS'Z'"); formatter1.setTimeZone(TimeZone.getTimeZone("Zulu")); DateFormat formatter2 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); formatter2.setTimeZone(TimeZone.getTimeZone("Zulu")); Date date = null; try { if (date == null) ... |
String | parseDatabaseDate(String dateString) parse Database Date String oldScheduledDate = dateString.replaceAll("/", "-"); DateFormat oldFormatter = new SimpleDateFormat("dd-MM-yyyy"); DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); Date oldDate = (Date) oldFormatter.parse(oldScheduledDate); return formatter.format(oldDate); |
Date | parseDD(String dateStr) yyyy-MM-dd try { return YYYY_MM_DD_FORMAT.get().parse(dateStr); } catch (Exception e) { return null; |
long | parseDelayTime(String time) parse Delay Time time = time.trim(); try { return parseTimeWithUnit(time); } catch (IllegalArgumentException e) { long value = 0; SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); try { value = format.parse(time).getTime(); ... |
long | parseDIGTime(String timestr) parse DIG Time long timeIns = 0; DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); try { Date date = (Date) formatter.parse(timestr); timeIns = date.getTime() / 1000; } catch (Exception e) { e.printStackTrace(); return timeIns; |
Object | parseDisplay4Key(Object date) dd/MM/yyyy -> yyyyMMdd return format4Key(sdf4Display.parse(date.toString()));
|
Date | parseDT(String fmt, String timeline) parse DT return getFmt(fmt).parse(timeline);
|
Date | parseDueDate(String date) Parses the due date. SimpleDateFormat format = new SimpleDateFormat(DATE_FORMAT2); try { return format.parse(date); } catch (ParseException e) { return new Date(); |
Date | parseEapoDate(String date) parse Eapo Date try { return new SimpleDateFormat(EAPO_DATE_FORMAT).parse(date); } catch (Exception e) { throw new RuntimeException(e); |