public String format(Date ref, Date then, long precision)
    {
        List<Duration> durations = DurationHelper.calculatePreciseDuration(ref, then, prettyTime.getUnits());
        List<Duration> retained = retainPrecision(durations, precision);
        return retained.isEmpty() ? "" : prettyTime.format(retained);
    }
public String format ( Date ref , Date then , long precision ) { List < Duration > durations = DurationHelper . calculatePreciseDuration ( ref , then , prettyTime . getUnits ( ) ) ; List < Duration > retained = retainPrecision ( durations , precision ) ; return retained . isEmpty ( ) ? "" : prettyTime . format ( retained ) ; }
Convenience format method for precise durations.

@param ref
The date of reference.
@param then
The future date.
@param precision
The precision to retain in milliseconds.
@return a relative format date as text representation or an empty string
if no durations are retained