private Duration getDuration ( String value ) { Duration result = null ; if ( value != null && value . length ( ) != 0 ) { double seconds = getLong ( value ) ; double hours = seconds / ( 60 * 60 ) ; double days = hours / 8 ; if ( days < 1 ) { result = Duration . getInstance ( hours , TimeUnit . HOURS ) ; } else { double durationDays = hours / 8 ; result = Duration . getInstance ( durationDays , TimeUnit . DAYS ) ; } } return ( result ) ; }
Converts the string representation of a Planner duration into an MPXJ Duration instance .