List of utility methods to do Minute Format
int | calculateDayMinutes(String dayBegin, String dayEnd) calculate Day Minutes int hour = Integer.parseInt(dayEnd.substring(0, 2)) - Integer.parseInt(dayBegin.substring(0, 2)); int minute = Integer.parseInt(dayEnd.substring(3)) - Integer.parseInt(dayBegin.substring(3)); return hour * 60 + minute; |
long[] | calculateHourMinute(long ms) calculate Hour Minute long hour = ms / (60 * 60 * 1000); long minute = (ms % (60 * 60 * 1000)) / (60 * 1000); return new long[] { hour, minute }; |
String | correctMinuteFormat(String minute) correct Minute Format if (minute.length() == 1) { minute = "0" + minute; return minute; |
String | formatMinutes(double value) format Minutes return String.format("%4.2f", value); |
String | formatMinutes(int minutes) Converts minutes to hours and minutes separated by colon, i.e. int hours = minutes / 60; int minuteRemainder = minutes % 60; return String.format("%d:%02d", hours, minuteRemainder); |
String | formatMinutes(long time) format Minutes return formatSeconds(time);
|
String | formatMinutes(long time) format Minutes if (time == Long.MAX_VALUE) { return "DNF"; String sign = ""; if (time < 0) { sign = "-"; time = -time; time = (time + 5) / 10; long minutes = time / 6000; long seconds = (time / 100) % 60; long centiseconds = time % 100; return sign + (minutes < 10 ? "0" + minutes : minutes) + ":" + (seconds < 10 ? "0" + seconds : seconds) + "." + (centiseconds < 10 ? "0" + centiseconds : centiseconds); |
String | formatMinutes(long time, String timerPrecisionId, boolean round) format Minutes String result = ""; if (time == Long.MAX_VALUE) { return "DNF"; String sign = ""; if (time < 0) { sign = "-"; time = -time; ... |
String | formatMinutes(long timeMinutes) format Minutes long days = timeMinutes / 60 / 24; long hours = timeMinutes / 60 % 24; long mins = timeMinutes % 60; StringBuilder sb = new StringBuilder(); boolean hasDays = days > 0; boolean hasHours = hours > 0; boolean hasMins = mins > 0; if (hasDays) { ... |
String | formatSecondsToMinutes(int secontsTotal) format Seconds To Minutes if (secontsTotal < 0) { return ""; int minutes = secontsTotal / 60; int secs = secontsTotal % 60; return minutes + ":" + String.format("%02d", secs); |