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

DateparseCompactDate(String exp)
parse Compact Date
return COMPACT_DATE.parse(exp);
DateparseCoTDate(String dateString)
parse Co T Date
if (!dateString.isEmpty()) {
    DateFormat formatter1 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SS'Z'");
    formatter1.setTimeZone(TimeZone.getTimeZone("Zulu"));
    DateFormat formatter2 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
    formatter2.setTimeZone(TimeZone.getTimeZone("Zulu"));
    Date date = null;
    try {
        if (date == null)
...
StringparseDatabaseDate(String dateString)
parse Database Date
String oldScheduledDate = dateString.replaceAll("/", "-");
DateFormat oldFormatter = new SimpleDateFormat("dd-MM-yyyy");
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
Date oldDate = (Date) oldFormatter.parse(oldScheduledDate);
return formatter.format(oldDate);
DateparseDD(String dateStr)
yyyy-MM-dd
try {
    return YYYY_MM_DD_FORMAT.get().parse(dateStr);
} catch (Exception e) {
return null;
longparseDelayTime(String time)
parse Delay Time
time = time.trim();
try {
    return parseTimeWithUnit(time);
} catch (IllegalArgumentException e) {
    long value = 0;
    SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    try {
        value = format.parse(time).getTime();
...
longparseDIGTime(String timestr)
parse DIG Time
long timeIns = 0;
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
try {
    Date date = (Date) formatter.parse(timestr);
    timeIns = date.getTime() / 1000;
} catch (Exception e) {
    e.printStackTrace();
return timeIns;
ObjectparseDisplay4Key(Object date)
dd/MM/yyyy -> yyyyMMdd
return format4Key(sdf4Display.parse(date.toString()));
DateparseDT(String fmt, String timeline)
parse DT
return getFmt(fmt).parse(timeline);
DateparseDueDate(String date)
Parses the due date.
SimpleDateFormat format = new SimpleDateFormat(DATE_FORMAT2);
try {
    return format.parse(date);
} catch (ParseException e) {
    return new Date();
DateparseEapoDate(String date)
parse Eapo Date
try {
    return new SimpleDateFormat(EAPO_DATE_FORMAT).parse(date);
} catch (Exception e) {
    throw new RuntimeException(e);