title: How do i format a java.time.Duration mm:ss
body: <p>I have a java.time.Duration and I want to output it in the form of mm:ss. It doesnt seem possible to use DateTimeFormatter since that only accepts LocalTime, ZonedTIme ectera</p>
  
  <p>So I did it like this, works fine for 90 seconds give 1:30, but for 66 seconds gives 1:6 whereas I want 1:06</p>
  
  <pre><code>Duration duration = Duration.ofSeconds(track.getLength().longValue());
  System.out.println(duration.toMinutes() + ":" + duration.minusMinutes(duration.toMinutes()).getSeconds());
  </code></pre>