Java Time Format formatTime(int time)

Here you can find the source of formatTime(int time)

Description

format Time

License

LGPL

Declaration

public static String formatTime(int time) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

public class Main {
    public static String formatTime(int time) {
        int seconds = time % 60;
        time /= 60;/*from  w  ww . j  a va2 s . c  om*/
        int minutes = time % 60;
        time /= 60;
        int hours = time % 24;
        time /= 24;
        int days = time;
        return String.format("%d:%02d:%02d:%02d", days, hours, minutes, seconds);
    }
}

Related

  1. formatTime(int originalTime)
  2. formatTime(int seconds)
  3. formatTime(int seconds)
  4. formatTime(int seconds)
  5. formatTime(int secs)
  6. formatTime(int time)
  7. formatTime(int time)
  8. formatTime(int time)
  9. formatTime(int time)