private Date getTime ( String value ) throws MPXJException { try { Number hours = m_twoDigitFormat . parse ( value . substring ( 0 , 2 ) ) ; Number minutes = m_twoDigitFormat . parse ( value . substring ( 2 , 4 ) ) ; Calendar cal = DateHelper . popCalendar ( ) ; cal . set ( Calendar . HOUR_OF_DAY , hours . intValue ( ) ) ; cal . set ( Calendar . MINUTE , minutes . intValue ( ) ) ; cal . set ( Calendar . SECOND , 0 ) ; cal . set ( Calendar . MILLISECOND , 0 ) ; Date result = cal . getTime ( ) ; DateHelper . pushCalendar ( cal ) ; return result ; } catch ( ParseException ex ) { throw new MPXJException ( "Failed to parse time " + value , ex ) ; } }
Convert a Planner time into a Java date .