Here you can find the source of parseMinutes(String timeInMinutes)
public static String parseMinutes(String timeInMinutes)
//package com.java2s; //License from project: Open Source License public class Main { public static String parseMinutes(String timeInMinutes) { if (timeInMinutes == null) return null; int time = Integer.parseInt(timeInMinutes); int minutes = time % 60; String pad = (minutes < 10 ? "0" : ""); return "" + (int) Math.floor(time / 60) + ":" + pad + minutes; }/*from w w w.ja va 2s .c o m*/ public static String parseMinutes(Integer timeInMinutes) { if (timeInMinutes == null) return null; int time = timeInMinutes; int minutes = time % 60; String pad = (minutes < 10 ? "0" : ""); return "" + (int) Math.floor(time / 60) + ":" + pad + minutes; } }