List of utility methods to do Parse Date Pattern YYYY
String | parseToRegExcel(String raw) parse To Reg Excel char c; String buf = "", regExcel = ""; for (int i = 0; i < raw.length(); i++) { c = raw.charAt(i); if (isNumeric(c) && i + 1 < raw.length() && isNumeric(raw.charAt(i + 1))) { while (isNumeric(c)) { buf += c; i++; ... |
String | parseToString(Date date) parse To String return parseToString(date, yyyyMMddHHmmss);
|
String | parseToString(Date date, String format) parse To String if (date == null) { return ""; if (format != null) { return (new SimpleDateFormat(format)).format(date); } else { return (new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")).format(date); |
String | parseToString(final Date date, final String format) The Method parseToString(Date, String) formats the given Date to the given Format. return parseToString(date, format, Locale.getDefault(Locale.Category.FORMAT));
|
String | parseToStringDate(long ms) parse To String Date SimpleDateFormat format = new SimpleDateFormat(FROMAT_2); String time = format.format(new Date(ms)); return time; |
Date | parseTwitterDate(String theDate) parse Twitter Date if (theDate == null || theDate.length() == 0) { return null; synchronized (format) { Date createdAt = format.parse(theDate); return createdAt; |
Date | parseUserDate(String date) parse User Date synchronized (userDateFormat) { return userDateFormat.parse(date); |
Date | parseUsGeneralDateTime(Date value) parse Us General Date Time SimpleDateFormat sdf = new SimpleDateFormat(US_DATE_PATTERN_GENERAL); return parseStringAsDate("yyyy/MM/dd HH:mm:ss", sdf.format(value)); |
Date | parseVariuosDateTime(String dateStr) parse Variuos Date Time int i = dateStr.indexOf('('); if (i >= 0) { dateStr = dateStr.substring(0, i); SimpleDateFormat dateFormat; List<String> patterns = new ArrayList<String>(); patterns.add("MM/dd HH:mm:ss"); patterns.add("MM/dd HH:mm"); ... |
Date | parseW3CDate(String dateString) parse WC Date SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ", Locale.US); int tzMinuteIndex = dateString.length() - 3; if (dateString.charAt(tzMinuteIndex) == ':') dateString = dateString.substring(0, tzMinuteIndex) + dateString.substring(tzMinuteIndex + 1); Date d = sdf.parse(dateString); return d; ... |