List of utility methods to do Date Format
String | formatDate(Context context, Calendar date, FileTimeDisplay fileTimeDisplay) Formats date. final Calendar _yesterday = Calendar.getInstance(); _yesterday.add(Calendar.DAY_OF_YEAR, -1); String res; if (android.text.format.DateUtils.isToday(date.getTimeInMillis())) { res = android.text.format.DateUtils.formatDateTime(context, date.getTimeInMillis(), _FormatShortTime); else if (date.get(Calendar.YEAR) == _yesterday.get(Calendar.YEAR) ... |
String | formatDate(Context context, long millis, FileTimeDisplay fileTimeDisplay) Formats date. Calendar cal = Calendar.getInstance();
cal.setTimeInMillis(millis);
return formatDate(context, cal, fileTimeDisplay);
|
String | formatDate(Date d) format Date SimpleDateFormat s = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); return s.format(d); |
String | formatDate(Date date) format Date return formatDate(date, DEFAULTFORMAT);
|
String | formatDate(Date date) Format date with default `DATE_FORMAT` and default locale `Locale.KOREA` return formatDate(date, DATE_FORMAT);
|
String | formatDate(Date date) Formats the given date according to the RFC 1123 pattern. return formatDate(date, PATTERN_RFC1123);
|
String | formatDate(Date date) Formats the given date according to the RFC 1123 pattern. return formatDate(date, PATTERN_RFC1123);
|
String | formatDate(Date date, String dateFormat) Format date with `dateFormat` given and default locale `Locale.KOREA` return formatDate(date, dateFormat, Locale.ENGLISH);
|
String | formatDate(Date date, String dateFormat, Locale locale) Format date SimpleDateFormat format = new SimpleDateFormat(dateFormat, locale); return format.format(date); |
String | formatDate(Date date, String pattern) format Date if (date == null) return ""; Calendar calendar = Calendar.getInstance(); calendar.setTime(date); return formatCalendar(calendar, pattern); |