List of utility methods to do Parse Date Pattern YYYY
String | parseSegKeyDate4Display(String source) yyyyMMdd -> dd/MM/yyyy return sdf4Display.format(sdf4Key.parse(source));
|
List | parseSessionTime(String response) parse Session Time List<Date> res = new ArrayList<Date>(); int idx = response.indexOf("<div class=\"purple_box\">"); while (idx > 0) { int sDayIdx = response.indexOf(">", idx + 10) + 1; String day = response.substring(sDayIdx, response.indexOf("<", sDayIdx)); SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy"); Date utilDate = null; try { ... |
Date | parseSilently(String p_string) parse Silently try { SimpleDateFormat parser = new SimpleDateFormat("EEE MMM d HH:mm:ss zzz yyyy"); return parser.parse(p_string); } catch (Exception e) { return null; |
Date | parseSimpleDate(String string, Date defaultDate) parse Simple Date if (string == null) { return defaultDate; try { return SIMPLE_DAY_FORMAT.parse(string); } catch (ParseException e) { return defaultDate; |
Date | parseSipDateTime(String dateStr) Parses the date and time from the given SIP2 formatted string. SimpleDateFormat simpleDf = new SimpleDateFormat("yyyyMMdd HHmmss"); try { return simpleDf.parse(dateStr); } catch (ParseException pe) { return null; |
Date | parseSolrDate(String date) parse Solr Date DateFormat dateFormat = new SimpleDateFormat(SOLR_DATE_FORMAT); dateFormat.setTimeZone(TIME_ZONE); return dateFormat.parse(date); |
Date | parseSpaydDate(String date, TimeZone tz) parse Spayd Date if (date == null) { return null; if (dateFormat == null) { dateFormat = new SimpleDateFormat("yyyyMMdd"); if (tz != null) { dateFormat.setTimeZone(tz); ... |
Date | parseString(String date) Parses a Date to a string using #DATE_STORAGE_FORMAT . if (date == null || date.isEmpty() || date.trim().equalsIgnoreCase("never")) { return null; try { return new SimpleDateFormat(DATE_STORAGE_FORMAT, Locale.ENGLISH).parse(date); } catch (ParseException ex) { return new Date(0L); |
Calendar | parseString(String dateStr) parse String return parseString(dateStr, DEFAULTFORMAT);
|
String | parseString(String strDate) parse String if (strDate == null || "".equals(strDate)) { return null; if (strDate.length() > 19) { strDate = strDate.substring(0, 19); Date bufferDate = parse(strDate, defaultDatePattern1); return format(bufferDate); ... |