@Test public void testSymbols() { DurationFormatter df = new DurationFormatter(Type.SHORT_SYMBOLS); Duration secDur = DefaultDuration.of(530, SECONDS); Duration minDur = secDur.convertTo(MINUTES); assertEquals("8min 50s", df.format(secDur)); assertEquals("8min 50s", df.format(minDur)); }
public String format(Duration duration) { return this.df.formatMillis((long) duration .getValue(TimeUnit.MILLISECONDS)); }
DurationFormatter { public String format(Duration duration) { return this.df.formatMillis((long) duration .getValue(TimeUnit.MILLISECONDS)); } }
DurationFormatter { public String format(Duration duration) { return this.df.formatMillis((long) duration .getValue(TimeUnit.MILLISECONDS)); } DurationFormatter(Type type); }
DurationFormatter { public String format(Duration duration) { return this.df.formatMillis((long) duration .getValue(TimeUnit.MILLISECONDS)); } DurationFormatter(Type type); String format(Duration duration); }
DurationFormatter { public String format(Duration duration) { return this.df.formatMillis((long) duration .getValue(TimeUnit.MILLISECONDS)); } DurationFormatter(Type type); String format(Duration duration);  }