public static String formatForUI(Calendar today,Calendar date){
  if (today.get(Calendar.YEAR) == date.get(Calendar.YEAR)) {
    if (today.get(Calendar.DAY_OF_YEAR) == date.get(Calendar.DAY_OF_YEAR)) {
      return "Today";
    }
    return currentYearDateFormat(date.getTimeInMillis());
  }
 else {
    return format(date.getTimeInMillis());
  }
}

public static String formatForUI ( Calendar today , Calendar date ) { if ( today . get ( Calendar . YEAR ) == date . get ( Calendar . YEAR ) ) { if ( today . get ( Calendar . DAY_OF_YEAR ) == date . get ( Calendar . DAY_OF_YEAR ) ) { return "Today" ; } return currentYearDateFormat ( date . getTimeInMillis ( ) ) ; } else { return format ( date . getTimeInMillis ( ) ) ; } }
formats the date in ui - friendly way
