Java Utililty Methods Parse Date

List of utility methods to do Parse Date

Description

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

Method

DateparseDate(String src, String pattern)
parse Date
return getSDFormat(pattern).parse(src);
DateparseDate(String srtDate, String pattern)
parses String to Date.
if (isNullStr(srtDate)) {
    return null;
SimpleDateFormat formatter = null;
if (pattern == null) {
    formatter = new SimpleDateFormat();
} else {
    formatter = new SimpleDateFormat(pattern);
...
LongparseDate(String str)
parse Date
try {
    synchronized (dateDirNameFormatter__) {
        return new Long(dateDirNameFormatter__.parse(str).getTime());
} catch (ParseException pe) {
    return null;
DateparseDate(String str)
Parse the date from a string and return it.
if (str.length() == 0)
    return null;
str = str.replace('-', '/'); 
Matcher m = dayFirst.matcher(str); 
if (m.find()) {
    str = m.replaceFirst(m.group(2) + " " + m.group(1));
m = noYear.matcher(str); 
...
DateparseDate(String str)
parse Date
return parseDateTime(str, DATE_PATTERN);
DateparseDate(String str)
Parse the given string as a date, using one of the accepted ISO-8601 date patterns.
SimpleDateFormat parser = new SimpleDateFormat();
parser.setLenient(false);
parser.setTimeZone(TimeZone.getTimeZone("UTC"));
str = str.replaceAll("(\\+|\\-)(\\d\\d):(\\d\\d)$", "$1$2$3");
str = str.replaceAll("Z$", "+0000");
ParsePosition pos = new ParsePosition(0);
for (String parsePattern : iso8601Patterns) {
    parser.applyPattern(parsePattern);
...
DateparseDate(String str)
Parses a date.
ParsePosition pos = new ParsePosition(0);
Date result = dateFormatter3.parse(str, pos);
if (result != null && pos.getIndex() < str.length())
    result = null;
return result;
DateparseDate(String str)
parse Date
SimpleDateFormat sdf = getDefaultDateFormat();
return sdf.parse(str);
DateparseDate(String str, boolean strict, String... parsePatterns)
Parse a date/time string with multiple patterns.
return parseDate(str, strict, null, null, parsePatterns);
DateparseDate(String str, DateFormat df)
Parses a presumptive date or date/time, using a supplied format pattern.
if (df == null) {
    return null;
if (str == null || str.trim().isEmpty()) {
    return null;
Date date = null;
try {
...