@Override protected EnterFromDateToToDateActivity.TimeObject timeObjectFromCalendar(Calendar c){
  int year=c.get(Calendar.YEAR);
  int month=c.get(Calendar.MONTH);
  c.set(year,month,1,0,0,0);
  c.set(Calendar.MILLISECOND,0);
  long startTime=c.getTimeInMillis();
  c.set(year,month,c.getActualMaximum(Calendar.DAY_OF_MONTH),23,59,59);
  c.set(Calendar.MILLISECOND,999);
  long endTime=c.getTimeInMillis();
  if (mFullDate) {
    return new EnterFromDateToToDateActivity.TimeObject(String.format("%tb %tY",c,c),startTime,endTime);
  }
 else {
    return new EnterFromDateToToDateActivity.TimeObject(String.format("%tB",c),startTime,endTime);
  }
}

@ Override protected EnterFromDateToToDateActivity . TimeObject timeObjectFromCalendar ( Calendar c ) { int year = c . get ( Calendar . YEAR ) ; int month = c . get ( Calendar . MONTH ) ; c . set ( year , month , 1 , 0 , 0 , 0 ) ; c . set ( Calendar . MILLISECOND , 0 ) ; long startTime = c . getTimeInMillis ( ) ; c . set ( year , month , c . getActualMaximum ( Calendar . DAY_OF_MONTH ) , 23 , 59 , 59 ) ; c . set ( Calendar . MILLISECOND , 999 ) ; long endTime = c . getTimeInMillis ( ) ; if ( mFullDate ) { return new EnterFromDateToToDateActivity . TimeObject ( String . format ( "%tb %tY" , c , c ) , startTime , endTime ) ; } else { return new EnterFromDateToToDateActivity . TimeObject ( String . format ( "%tB" , c ) , startTime , endTime ) ; } }
creates an timeobject from a calendarinstance
