List of utility methods to do Date Format Pattern
SimpleDateFormat | getFolderFormat() get Folder Format return new SimpleDateFormat("yyyy_MM_dd"); |
DateFormat | getFormat() get Format final SimpleDateFormat fmt = new SimpleDateFormat(SNAPSHOT_TSTAMP_FORMAT); return fmt; |
SimpleDateFormat | getFormat() get Format return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
String | getFormat(long stamp) get Format return getFormat(stamp, "dd.MM.yyyy HH:mm:ss.SSS"); |
String | getFormat(long stamp, String pattern) Get the dateFormat from given timestamp in milliseconds and the pattern return new SimpleDateFormat(pattern).format(new Date(stamp)); |
SimpleDateFormat | getFormat(String format) get Format if (format == null || "".equals(format)) { format = DATE_FORMAT2; return new SimpleDateFormat(format); |
SimpleDateFormat | getFormat(String formatPattern) get Format Map<String, SimpleDateFormat> threadMap = FORMATS.get(); if (threadMap == null) { threadMap = new HashMap<String, SimpleDateFormat>(); FORMATS.set(threadMap); SimpleDateFormat format = threadMap.get(formatPattern); if (format == null) { format = new SimpleDateFormat(formatPattern); ... |
DateFormat | getFormat(String formatString) get Format if (formatCache.get() == null) { formatCache.set(new WeakHashMap<String, DateFormat>()); DateFormat format = formatCache.get().get(formatString); if (format == null) { format = new SimpleDateFormat(formatString); format.setTimeZone(TimeZone.getTimeZone("UTC")); formatCache.get().put(formatString, format); ... |
DateFormat | getFormat(String pattern) get Format DateFormat format = DFS.get(pattern); if (format == null) { format = new SimpleDateFormat(pattern); DFS.put(pattern, format); return format; |
String | getFormatCurrentAdd(int amount, String format) get Format Current Add Date d = getDateAdd(new Date(), amount); return getFormatDateTime(d, format); |