List of utility methods to do Date Format Pattern
String | getMM(Date date) get MM return DATE_FORMAT6.format(date);
|
int | getMM(String strDate) Insert the method's description here. Calendar calendar = Calendar.getInstance();
calendar.setTime(convertStringToDate(strDate));
return calendar.get(Calendar.MONTH) + 1;
|
SimpleDateFormat | getMMdd() get M Mdd SimpleDateFormat mmdd = new SimpleDateFormat("MM/dd"); return mmdd; |
String | getMMDDYYHHMM() get MMDDYYHHMM return getMMDDYYHHMM(new Date()); |
String | getMMDDYYYY(final Date date, final String separator) Returns the date as month/day/year with the supplied separator. SimpleDateFormat format = new SimpleDateFormat("MM" + separator + "dd" + separator + "yyyy"); return format.format(date); |
SimpleDateFormat | getMomentFormatter() get Moment Formatter return m_momentFormat;
|
SimpleDateFormat | getPooledSDF(String format) Gets a SimpleDateFormat for the given format. SimpleDateFormat sdf = null; Stack stack = (Stack) sdfCache.get(format); if (stack != null) { try { sdf = (SimpleDateFormat) stack.pop(); } catch (EmptyStackException ese) { if (sdf == null) { sdf = new SimpleDateFormat(format); return sdf; |
SimpleDateFormat | getSdf(String formatPattern) get Sdf SimpleDateFormat sdf = sdfLocal.get(); if (sdf == null) { sdf = new SimpleDateFormat(formatPattern); sdfLocal.set(sdf); return sdf; |
File | getSimpleDataFormattedFile(File file) This method will be called for create a backup file. SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss"); String date = df.format(new Date()); String filename = file.getName(); int index = filename.lastIndexOf("."); if (index != -1) filename = filename.substring(0, index) + "." + date + "." + filename.substring(index + 1); else filename = filename + "." + date; ... |
DateFormat | getSortedTimetampFormat() get Sorted Timetamp Format return new SimpleDateFormat("yyyyMMddHHmmss"); |