List of utility methods to do Hour Format
String | formatCalTime(Date time) Returns a string from a date. return iCalTimeFormat.format(time);
|
String | formatCapDate(Calendar cal) Formats the given date as a [datetime]. SimpleDateFormat format = new SimpleDateFormat(DATETIME_FORMAT); format.setTimeZone(cal.getTimeZone()); StringBuilder ret = new StringBuilder(format.format(cal.getTime())); ret.insert(ret.length() - 2, ':'); return ret.toString(); |
String | formatCompleteDate(Date date) format Complete Date return tsvCompleteDateFormat.format(date);
|
String | formatCreationDate(String creationDate) format Creation Date SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd MMM yyyy HH:mm"); SimpleDateFormat jiraDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ"); return simpleDateFormat.format(jiraDateFormat.parse(creationDate)); |
String | formatCurrentDateForDebug() Formats the current date and time for debugging purposes. return debugDate.format(Calendar.getInstance().getTime());
|
String | formatCurrentTime() format Current Time return getDateFormat().format(new Date()); |
String | formatCurrentTime() format Current Time return new SimpleDateFormat("yyyy-MM-dd HH-mm-ss.S Z").format(new Date()); |
String | formatCurrentTime(final String format) format the current time return dateToString(getTime(), format);
|
String | formatDate(Calendar currentDate, String pattern) format Date if (currentDate == null || pattern == null) { throw new NullPointerException("The arguments are null !"); Date date = currentDate.getTime(); return formatDate(date, pattern); |
String | formatDate(Calendar time) format Date SimpleDateFormat formatter = new SimpleDateFormat("yyyy'-'MM'-'dd' 'HH':'mm':'ss'.'SSS"); TimeZone TZ_UTC = TimeZone.getTimeZone("UTC"); formatter.setTimeZone(TZ_UTC); return formatter.format(time.getTime()); |