List of utility methods to do Date Format ISO
String | formatISODateTime(Date date) Format Date into ISO 8601 full datetime string. if (date == null) return null; synchronized (ISO_DATE_FORMAT) { return ISO_DATE_FORMAT.format(date); |
String | formatOneDecimal(int iNumber, int iDivisor) format One Decimal if (iDivisor == 0) { return "??"; return formatOneDecimal(iNumber / (double) iDivisor); |
String | formattedIso8601DateString(Calendar pCal) formatted Iso Date String Date date = pCal.getTime(); String result = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss").format(date); return result + "Z"; |
String | formatTimestampIso8601(long millis, TimeZone zone) Returns a string representation of the specified timestamp value in the ISO 8601 (RFC 3339) format (e.g. SimpleDateFormat f = new SimpleDateFormat(TIMESTAMP_FORMAT_ISO8601, Locale.US); f.setTimeZone(zone != null ? zone : TimeZone.getDefault()); return f.format(new Date(millis)); |
String | formatToIso8601(Date d) Formats a Date into a String in ISO8601 format synchronized (MONITOR) { return ISO8601.format(d); |
String | formatToISO8601(Date date) Formata a data para o formato ISO8601 usado pelo elastic search String formatted = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ").format(date); return formatted.substring(0, 22) + ":" + formatted.substring(22); |
String | formatWikiISO8601(Date d) format Wiki ISO return ISO8601_WIKI_FORMAT.format(d);
|
Calendar | fromIso8601(@Nullable String date) Converts a ISO-8601 string to a Calendar -object. if (date == null) { return null; return javax.xml.bind.DatatypeConverter.parseDateTime(date); |
Date | fromIso8601(String iso) Converts an ISO 8601 string to a date. if (iso == null) return null; Calendar c1 = DatatypeConverter.parseDateTime(iso); GregorianCalendar c = new GregorianCalendar(TimeZone.getTimeZone("UTC")); c.setTimeInMillis(c1.getTimeInMillis()); return new Date(c.getTimeInMillis()); |
String | get_ISO_8601() geIS_ String result = _ISO_8601.get().format(new Date()); result = result.replace("GMT", ""); return result; |