List of utility methods to do Date Format
String | formatDate(final java.util.Date date, final Supplier format Date final DateFormat dateFormat = formatSupplier.get(); if (dateFormat == null) { return String.valueOf((date).getTime()); return dateFormat.format(date); |
Date | formatDate(int day, int month, int year) format Date final SimpleDateFormat dateFormat = new SimpleDateFormat(DATE); final StringBuilder sb = new StringBuilder(); Date date = new Date(); sb.append(String.valueOf(day) + "-"); sb.append(String.valueOf(month) + "-"); sb.append(String.valueOf(year)); try { date = dateFormat.parse(sb.toString()); ... |
String | formatDate(Integer day, Integer month, Integer year) format Date if (year == null) { return null; Date date = new GregorianCalendar(year, month != null ? month - 1 : 0, day != null ? day : 1).getTime(); if (month == null) { return new SimpleDateFormat("yyyy").format(date); } else if (day == null) { return new SimpleDateFormat("yyyy-MM").format(date); ... |
String | formatDate(java.util.Calendar in) convert a Calendar into a readable string return (formatDate(in.getTime()));
|
String | formatDate(java.util.Date date) format Date return format(date, "yyyy-MM-dd"); |
String | formatDate(java.util.Date paramDate) format Date if (paramDate == null) return null; SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); localSimpleDateFormat.setLenient(false); return localSimpleDateFormat.format(paramDate); |
String | formatDate(Object obj) format Date if (obj == null) { return ""; try { java.util.Date dateval = (java.util.Date) obj; SimpleDateFormat dateformat = new SimpleDateFormat("MM/dd/yyyy"); dateformat.setLenient(false); return dateformat.format(dateval); ... |
String | formatDate6(Date date) format Date return dateFormat6.format(date);
|