List of utility methods to do Date ISO Parse
double | ISO8601ToSeconds(String iso8601) Converts an ISO8601 timestamp into a RBNB timestamp. return ISO8601_DATE_FORMAT.parse(iso8601).getTime() / 1000d;
|
Date | isoDateStringToDate(String dateString) Converts an ISO-formatted String representation of a date to a Date object. return new SimpleDateFormat("yyyy-MM-dd HH:mm").parse(dateString); |
boolean | isOneOf(String value, String... values) Checks if the given value exists in any of the values provided. If the value to search for is null and the values to search in contain at lest one null value, then this operation returns true. return isOneOf(value, (Object[]) values);
|
double | ISOToJulianDate(String dateObs) Transforms an ISO date to a julian date. SimpleDateFormat sdf; if (dateObs.contains("T") && dateObs.contains(".")) { sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.sss"); } else if (dateObs.contains("T")) { sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); } else if (dateObs.contains("-")) { sdf = new SimpleDateFormat("yyyy-MM-dd"); } else { ... |
boolean | isValidISO8601(String time) is Valid ISO if (time.length() < 6) { return false; try { if (time.endsWith("Z")) { time = time.substring(0, time.length() - 1) + "GMT-00:00"; } else { time = time.substring(0, time.length() - 6) + "GMT" ... |
String | normalizeToISO8601(String sDate, TimeZone tz) Convert the given sDate in iso 8601 format. if (sDate == null || sDate.equals("")) { return sDate; if (tz != null) { SimpleDateFormat utcFormatter = new SimpleDateFormat(PATTERN_UTC); utcFormatter.setTimeZone(TIMEZONE_UTC); Date date = null; try { ... |
Date | parseAwsFlavouredISO8601Date(String dateString) parse Aws Flavoured ISO Date synchronized (awsFlavouredISO8601DateParser) { return awsFlavouredISO8601DateParser.parse(dateString); |
Date | parseDate(String iso8061StrDateTime) Will parse a date formatted in iso8061 (example: 2010-10-01T13:33:50-04:00) into a java.util.Date. if (iso8061StrDateTime == null) { return null; try { return ATHENA_DATE_TIME_FORMAT.parseDateTime(iso8061StrDateTime).toDate(); } catch (IllegalArgumentException iae) { return ATHENA_DATE_FORMAT.parseDateTime(iso8061StrDateTime).toDate(); |
Calendar | parseDateISO(String date) parse Date ISO return parseDateTime(date, FORMAT_DATE_ISO);
|
Date | parseDateISO(String value) parse Date ISO if (value == null) { return null; isoFormat.applyPattern(ISO_FORMAT_SECONDS); try { return isoFormat.parse(value); } catch (ParseException pe) { isoFormat.applyPattern("yyyy-MM-dd"); try { return isoFormat.parse(value); } catch (ParseException pe) { return null; |