public double makeValue ( Date date ) { double secs = date . getTime ( ) / 1000.0 ; double origin_secs = getDateOrigin ( ) . getTime ( ) / 1000.0 ; double diff = secs - origin_secs ; try { timeUnit . setValueInSeconds ( diff ) ; } catch ( Exception e ) { throw new RuntimeException ( e . getMessage ( ) ) ; } return timeUnit . getValue ( ) ; }
Create the equivalent value from this base unit and the given Date . Inverse of makeDate .