List of utility methods to do Calendar Format
String | format(Calendar calendar) Extrats date from the specified calendar and formats it using default date format. return dateFormat.format(calendar.getTime());
|
String | format(Calendar calendar, String format) format if (format.contains(TWY)) { String twy = String.valueOf(calendar.get(Calendar.YEAR) - 1911); while (twy.length() < 3) { twy = "0" + twy; format = format.replace(TWY, twy); } else if (format.contains(TW)) { String twy = String.valueOf(calendar.get(Calendar.YEAR) - 1911); ... |
String | format(Calendar calendar, String format) format return format(calendar.getTimeInMillis(), format);
|
String | format(Calendar calendar, String formatString) format if (calendar == null) return ""; SimpleDateFormat frmt = new SimpleDateFormat(formatString); Date date = calendar.getTime(); return frmt.format(date); |
String | format(Calendar calendar, String pattern) Formats the given Calendar while considering the time zone information. return format(calendar, new SimpleDateFormat(pattern)); |
String | format(Calendar current) Format the date. return format(current.getTime());
|
String | format(Calendar self, String pattern) Shortcut for java.text.SimpleDateFormat to output a String representation of this calendar instance. SimpleDateFormat sdf = new SimpleDateFormat(pattern); sdf.setTimeZone(self.getTimeZone()); return sdf.format(self.getTime()); |
String | format(final Calendar cal) Formats a Calendar value into an ISO8601-compliant date/time string.
if (cal == null) { throw new IllegalArgumentException("argument can not be null"); int year = cal.get(Calendar.YEAR); if (cal.isSet(Calendar.ERA) && cal.get(Calendar.ERA) == GregorianCalendar.BC) { year = 0 - year + 1; StringBuilder buf = new StringBuilder(); ... |
String | formatarData(Calendar data) formatar Data return dataSimples.format(new Date(data.getTimeInMillis())); |
String | formatCalendar(Calendar calendar) format Calendar return formatCalendar(calendar, DEFAULTFORMAT);
|