List of utility methods to do Date Format ISO
String | iso8601(final Date date) iso final SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ"); final String result = dateFormatter.format(date); return result.substring(0, result.length() - 2) + ":" + result.substring(result.length() - 2); |
String | iso8601Date(Date d) Return the ISO8601 string representation of a date. if (d == null) return null; SimpleDateFormat asGMTiso8601 = new SimpleDateFormat(PATTERN_ISO8601); asGMTiso8601.setTimeZone(TimeZone.getTimeZone("GMT")); return asGMTiso8601.format(d); |
String | isoDateFormat(Calendar calendar) iso Date Format TimeZone tz = TimeZone.getTimeZone("UTC"); DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'"); df.setTimeZone(tz); return df.format(calendar.getTime()); |
String | isoDateFormat(final Date date) Formatea una fecha en YYYY-MM-DD return getFormatter().format(date);
|
String | isoDateTimeUTC(final Date val) Turn Date into "yyyyMMddTHHmmssZ" synchronized (isoDateTimeUTCFormat) { return isoDateTimeUTCFormat.format(val); |
String | isoFormat(Date date) iso Format return isoDateFormat.format(date);
|
String | isoTime(Date d) iso Time if (d == null) return null; return isoDateFormat.format(d); |
String | longToISODate(long longDate) long To ISO Date Date date = new Date(longDate); return dateToISODate(date); |
String | makeDateISO8601(Date date) make Date ISO SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"); String result = df.format(date); result = result.substring(0, result.length() - 2) + ":" + result.substring(result.length() - 2); return result; |
String | millisecondsToISO8601(long date) Converts the date and time provided in numbers of milliseconds since the epoch to a ISO8601 date and time representation (UTC to the millisecond). return ISO8601_DATE_FORMAT.format(new Date(date)); |