List of utility methods to do Minute Format
String | formatTimeInMinutes(long l) format Time In Minutes if (l <= 0) return null; long mins = l / 1000 / 60; if (l > 0) { return String.valueOf(mins) + " min"; return ""; |
String | getFormattedHoursAndMinutes(final long millis) get Formatted Hours And Minutes final long seconds = millis / 60000; final int hours = (int) seconds / 60; final int minutes = (int) seconds % 60; final StringBuilder buf = new StringBuilder(); buf.append(hours).append(":"); formatNumber(buf, minutes); return buf.toString(); |
String | toReadableMinutes(long time) Converts a time format in long form to a human-readable minute value if (time > 3600) { return String.format("%d:%02d:%02d", time / 3600, (time % 3600) / 60, (time % 60)); } else { return String.format("%d:%02d", (time % 3600) / 60, (time % 60)); |