private void addHours ( ProjectCalendarDateRanges ranges , Record hoursRecord ) { if ( hoursRecord . getValue ( ) != null ) { String [ ] wh = hoursRecord . getValue ( ) . split ( "\\|" ) ; try { String startText ; String endText ; if ( wh [ 0 ] . equals ( "s" ) ) { startText = wh [ 1 ] ; endText = wh [ 3 ] ; } else { startText = wh [ 3 ] ; endText = wh [ 1 ] ; } // for end time treat midnight as midnight next day if ( endText . equals ( "00:00" ) ) { endText = "24:00" ; } Date start = m_calendarTimeFormat . parse ( startText ) ; Date end = m_calendarTimeFormat . parse ( endText ) ; ranges . addRange ( new DateRange ( start , end ) ) ; } catch ( ParseException e ) { // silently ignore date parse exceptions } } }
Parses a record containing hours and add them to a container .