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

DateparseOpenMrsDate(String date)
parse Open Mrs Date
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
return dateFormat.parse(date);
DateparsePurgeDateString(String str)
parse Purge Date String
if (str == null) {
    return null;
SimpleDateFormat purgeDateFormat = new SimpleDateFormat(PURGE_DATE_FORMAT);
return purgeDateFormat.parse(str);
Dateparser(String strDate, String formatter)
parser
SimpleDateFormat sdf = new SimpleDateFormat(formatter);
try {
    return sdf.parse(strDate);
} catch (Exception e) {
    return null;
DateparserDate(String str)
parser Date
if (null == str)
    return null;
return parserDate(str, format0);
StringparseRegExcelNumber(String number)
parse Reg Excel Number
String today_d = formatToday("dd"), today_m = formatToday("MM"), today_y = formatToday("yyyy");
String regex = "(" + today_y.substring(0, 2) + ")?" + today_y.substring(2) + today_m + today_d;
Pattern p = Pattern.compile(regex);
Matcher m = p.matcher(number);
String buf = "";
if (m.find()) {
    if (m.group().length() == 6) {
        buf = (m.start() == 0 ? "" : "<NUMBER>") + "<DATE:TODAY:YYMMDD>"
...
DateparseResponseDate(String date)
parse Response Date
Date returnDate = null;
for (int i = 0; i < DATETIME_FORMATS.length; ++i) {
    try {
        returnDate = DATETIME_FORMATS[i].parse(date);
        return returnDate;
    } catch (ParseException e) {
return null;
DateparseRoundTripDateString(String roundTripString)
Parses the given round-trip date string (e.g.
SimpleDateFormat roundTripDateFormat = new SimpleDateFormat(ROUND_TRIP_DATE_FORMAT);
Date date = roundTripDateFormat.parse(roundTripString);
return date;
DateparseRSSDate(String dateStr)
parse RSS Date
for (String format : RSS_DATE_FORMATS) {
    DateFormat formatter = new SimpleDateFormat(format, Locale.ROOT);
    try {
        Date date = formatter.parse(dateStr);
        return date;
    } catch (Exception e) {
return null;
DateparseSalesDate(final String ymd)
parse Sales Date
if (ymd == null || ymd.isEmpty()) {
    return null;
final DateFormat dateFormat = new SimpleDateFormat(H_DATE_FROMAT);
Date tmp;
try {
    tmp = dateFormat.parse(ymd);
} catch (ParseException e) {
...
DateparseSecureDate(final String dateString)
Parses the given string date-time.
try {
    final Date date = SDF.parse(dateString);
    return date;
} catch (ParseException e) {
    return null;