Here you can find the source of formatTime(int minutes)
public static String formatTime(int minutes)
//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; } }