List of utility methods to do Date Format ISO
String | getISO8601UTCString(Date d) get ISOUTC String try { SimpleDateFormat formatter = new SimpleDateFormat(); formatter.setTimeZone(TimeZone.getTimeZone("UTC")); SimpleDateFormat simple = new SimpleDateFormat("M/d/yy h:mm a"); Date UTCDate = simple.parse(formatter.format(d.getTime())); SimpleDateFormat ISO8061Formatter = new SimpleDateFormat(ISO8061UTC); return ISO8061Formatter.format(UTCDate); } catch (Exception e) { ... |
String | getISODate() get ISO Date return getISODate(new Date()); |
String | getISODate() Get todays date and format into an ISO date string and return return isoFormatter.format(getToday());
|
String | getISODate(int i) get ISO Date DateFormat df = new SimpleDateFormat("YYYY-MM-dd"); Calendar cal = Calendar.getInstance(); cal.add(Calendar.YEAR, -i); String date = df.format(cal.getTime()); return date; |
DateFormat | getIsoDateFormat() get Iso Date Format return new SimpleDateFormat(ISO_DATE_PATTERN); |
DateFormat | getIsoDateFormat() Retrieve the common ISO date format. return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); |
DateFormat | getIsoDateFormater() Returns the isoDateFormater. return getFormatter();
|
SimpleDateFormat | getISODateFormatterShort() get ISO Date Formatter Short return new SimpleDateFormat("yyyy-MM-dd"); |
String | getISODateStr(Date date) get ISO Date Str return isoDateFormat.format(date);
|
String | getISODateStringFormat(Date ts) get ISO Date String Format String result = ""; try { String temp = new java.text.SimpleDateFormat("yyyy-MM-dd").format(ts); result = temp.substring(0, 4); result = result + "-"; result = result + temp.substring(5, 7); result = result + "-"; result = result + temp.substring(8, 10); ... |