Java Time Format formatTime(int minutes)

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

Description

format Time

License

Open Source License

Declaration

public static String formatTime(int minutes) 

Method Source Code

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

public class Main {
    public static String formatTime(int minutes) {
        String time = "";
        int hours = minutes / 60;
        if (hours > 0) {
            int days = hours / 24;
            if (days > 0) {
                time += days + "d ";
            }/*from  ww  w .  j  av  a  2  s . c om*/
            time += (hours % 24) + "h ";
        }
        time += (minutes % 60) + "m";
        return time;
    }
}

Related

  1. formatTime(final int timeSec)
  2. formatTime(final long time)
  3. formatTime(final long time)
  4. formatTime(final long timeMS)
  5. formatTime(float seconds)
  6. formatTime(int minutes)
  7. formatTime(int originalTime)
  8. formatTime(int seconds)
  9. formatTime(int seconds)