Java Duration Format formatDuration(Duration duration)

Here you can find the source of formatDuration(Duration duration)

Description

format Duration

License

Open Source License

Declaration

public static String formatDuration(Duration duration) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.time.Duration;

public class Main {
    public static String formatDuration(Duration duration) {
        return String.format("%02d:%02d:%02d", duration.toHours(), duration.getSeconds() % 3600 / 60,
                duration.getSeconds() % 60);
    }/*from   w  w w.  j  a  va  2s.  co  m*/
}

Related

  1. durationTranslator(String sonarDuration)
  2. format8601Duration(long duration)
  3. formatBuildDuration(final long duration)
  4. formatDuration(double dblSeconds)
  5. formatDuration(Duration d)
  6. formatDuration(Duration duration)
  7. formatDuration(Duration duration)
  8. formatDuration(Duration duration)
  9. formatDuration(Duration duration)