List of utility methods to do Hour Format
String | formatHTTPDate(Date pTime) Formats the time to a HTTP date, using the RFC 1123 format, as described in RFC 2616 (HTTP/1.1), sec. synchronized (HTTP_RFC1123_FORMAT) { return HTTP_RFC1123_FORMAT.format(pTime); |
String | formatInfo(String info) format Info return getCurDateTime() + " : " + info + "\n"; |
String | formatInternal(final Date date) Formats a date to use for internal purposes (logging, toString) final String formatedDate = (date == null) ? "N/A" : new SimpleDateFormat(DEFAULT_DATE_TIME_FORMAT).format(date); return formatedDate; |
String | formatInterval(long intervalMsec) Formats the specified time interval as an interval string with format: "d days hh:mm:ss.SSS" long rem = intervalMsec; long days = rem / 86400000; rem -= days * 86400000; long hours = rem / 3600000; rem = -hours * 3600000; long min = rem / 60000; rem -= min * 60000; long sec = rem / 1000; ... |
String | formatLastModified(long lastModifiedTime) format Last Modified return dateFormat.format(new Date(lastModifiedTime)); |
String | formatMessage(String message) format Message return _DateFormatter.format(new Date()) + " IBController: " + message; |
String | formatMM(Date date) yyyy-MM-dd HH:mm return YYYY_MM_DD_HH_MM_FORMAT.get().format(date);
|
String | formatNanosTimeUSEastern(long nanos) format Nanos Time US Eastern long millis = nanos / 1000000; Formatter nanosFormat = new Formatter(); nanosFormat.format("%06d", nanos - millis * 1000000); Date d = new Date(millis); synchronized (US_EASTERN_FORMAT_MILLIS) { return US_EASTERN_FORMAT_MILLIS.format(d) + nanosFormat.toString(); |
Date | formatNewDate(String format) format New Date SimpleDateFormat sdf = new SimpleDateFormat(format); try { return sdf.parse(dateToString(new Date(), format)); } catch (ParseException e) { e.printStackTrace(); return null; |
String | formatOffset(int offset) format Offset int offsetHours = offset / 3600000; int offsetMinutes = (offset / 60000) % 60; return (HH.format(offsetHours) + MM.format(offsetMinutes)); |