public Interval withPeriodBeforeEnd ( ReadablePeriod period ) { if ( period == null ) { return withDurationBeforeEnd ( null ) ; } Chronology chrono = getChronology ( ) ; long endMillis = getEndMillis ( ) ; long startMillis = chrono . add ( period , endMillis , - 1 ) ; return new Interval ( startMillis , endMillis , chrono ) ; }
Creates a new interval with the specified period before the end instant .