Android Utililty Methods Calendar Format

List of utility methods to do Calendar Format

Description

The list of methods to do Calendar Format are organized into topic(s).

Method

StringBufferformatDA(Calendar c, StringBuffer sb)
format DA
int yyyy = c.get(Calendar.YEAR);
int mm = c.get(Calendar.MONTH) + 1;
int dd = c.get(Calendar.DAY_OF_MONTH);
sb.append(yyyy);
if (mm < 10)
    sb.append("0");
sb.append(mm);
if (dd < 10)
...
StringformatDBDateTime(Calendar c)
format DB Date Time
return c == null ? null : dbDateTimeFormat.format(c.getTime());
StringformatDate(Calendar c)
format Date
return c == null ? null : dateFormat.format(c.getTime());
CharSequenceformatDate(Calendar date, String format)
format Date
if (date == null)
    return "";
return new SimpleDateFormat(format, Locale.getDefault())
        .format(date.getTime());
CharSequenceformatDate(Context ctx, Calendar date)
format Date
if (date == null)
    return "";
if (MirakelPreferences.isDateFormatRelative()) {
    GregorianCalendar now = new GregorianCalendar();
    now.setTime(new Date());
    if (Build.VERSION.SDK_INT > Build.VERSION_CODES.JELLY_BEAN_MR1
            || !(now.get(Calendar.YEAR) == date.get(Calendar.YEAR)
                    && now.get(Calendar.DAY_OF_MONTH) == date
...
StringformatDateTime(Calendar c)
format Date Time
return c == null ? null : dateTimeFormat.format(c.getTime());
CharSequenceformatReminder(Context ctx, Calendar date)
format Reminder
return DateTimeHelper.formatDate(date,
        ctx.getString(R.string.humanDateTimeFormat));
StringBufferformatTM(Calendar c, StringBuffer sb)
format TM
int hh = c.get(Calendar.HOUR_OF_DAY);
int mm = c.get(Calendar.MINUTE);
int ss = c.get(Calendar.SECOND);
int ms = c.get(Calendar.MILLISECOND);
if (hh < 10)
    sb.append("0");
sb.append(hh);
if (mm < 10)
...
StringformatTaskWarrior(Calendar c)
format Task Warrior
return c == null ? null : taskwarriorFormat.format(c.getTime());
StringformateCalDav(Calendar c)
formate Cal Dav
return c == null ? null : caldavFormat.format(c.getTime());