Java Utililty Methods Parse Date Pattern YYYY

List of utility methods to do Parse Date Pattern YYYY

Description

The list of methods to do Parse Date Pattern YYYY are organized into topic(s).

Method

StringparseToRegExcel(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++;
...
StringparseToString(Date date)
parse To String
return parseToString(date, yyyyMMddHHmmss);
StringparseToString(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);
StringparseToString(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));
StringparseToStringDate(long ms)
parse To String Date
SimpleDateFormat format = new SimpleDateFormat(FROMAT_2);
String time = format.format(new Date(ms));
return time;
DateparseTwitterDate(String theDate)
parse Twitter Date
if (theDate == null || theDate.length() == 0) {
    return null;
synchronized (format) {
    Date createdAt = format.parse(theDate);
    return createdAt;
DateparseUserDate(String date)
parse User Date
synchronized (userDateFormat) {
    return userDateFormat.parse(date);
DateparseUsGeneralDateTime(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));
DateparseVariuosDateTime(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");
...
DateparseW3CDate(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;
...