question: private void createDaySlot ( ArrayList < MAssignmentSlot > list , MAssignmentSlot ma ) { Timestamp start = ma . getStartTime ( ) ; GregorianCalendar calStart = new GregorianCalendar ( ) ; calStart . setTime ( start ) ; calStart . set ( Calendar . HOUR_OF_DAY , 0 ) ; calStart . set ( Calendar . MINUTE , 0 ) ; calStart . set ( Calendar . SECOND , 0 ) ; calStart . set ( Calendar . MILLISECOND , 0 ) ; Timestamp end = ma . getEndTime ( ) ; GregorianCalendar calEnd = new GregorianCalendar ( ) ; calEnd . setTime ( end ) ; calEnd . set ( Calendar . HOUR_OF_DAY , 0 ) ; calEnd . set ( Calendar . MINUTE , 0 ) ; calEnd . set ( Calendar . SECOND , 0 ) ; calEnd . set ( Calendar . MILLISECOND , 0 ) ; while ( calStart . before ( calEnd ) ) { Timestamp xStart = new Timestamp ( calStart . getTimeInMillis ( ) ) ; calStart . add ( Calendar . DAY_OF_YEAR , 1 ) ; Timestamp xEnd = new Timestamp ( calStart . getTimeInMillis ( ) ) ; MAssignmentSlot myMa = new MAssignmentSlot ( xStart , xEnd , ma . getName ( ) , ma . getDescription ( ) , ma . getStatus ( ) ) ; list . add ( myMa ) ; } }
target:  Create a day slot for range