Java Utililty Methods Date RFC Format

List of utility methods to do Date RFC Format

Description

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

Method

DateRFC822Section5Format_to_Date(String time)
RFC Section Format Date
String format = "EEE, dd MMM yyyy hh:mm a";
Date date = string2Date(time, format);
return date;
StringtoRfc822(Calendar cal)
convert Calendar to Rfc822 format, See Standard for ARPA Internet Text Messages i.e.
Date dval = cal.getTime();
return toRfc822(dval);
StringtoRFC822Date(Date date)
to RFC Date
Calendar cal = new GregorianCalendar();
cal.setTime(date);
return toRFC822Date(cal);
StringtranslateStartTimeToRFC3339(String startTime)
translate Start Time To RFC
SimpleDateFormat srcParser = new SimpleDateFormat("YYYY-MM-DD'T'HH:mm:ss'Z'");
SimpleDateFormat dstFormater = new SimpleDateFormat("YYYY-MM-DD'T'HH:mm:ssXXX");
Date date = srcParser.parse(startTime);
return dstFormater.format(date);