List of utility methods to do Minute Get
long | currentTimeMinutes() current Time Minutes return currentTimeSeconds() / 60L;
|
long | fromMinutes(long seed) from Minutes return 60 * fromSeconds(seed);
|
String | getCompleteDayAsHourMinuteString() Returns a String representing the amount of time for a complete day (24 hours). return "24:00"; |
String | getElapsedTimeHoursMinutesFromMilliseconds(long milliseconds) elapsed time in hours/minutes/seconds String format = String.format("%%0%dd", 2); long elapsedTime = milliseconds / 1000; String seconds = String.format(format, elapsedTime % 60); String minutes = String.format(format, (elapsedTime % 3600) / 60); String hours = String.format(format, elapsedTime / 3600); String time = hours + ":" + minutes + ":" + seconds; return time; |
String | getFiveMinuteCronByHostId(long hostId) get Five Minute Cron By Host Id String baseCron = (hostId % 50) + " 0/5 * ? * *"; return baseCron; |
String | getFrequencyValueInMinutes(long value) get Frequency Value In Minutes if (value > 0) { long numHours = value / (1000 * 60); return String.valueOf(numHours) + " Minutes"; return ""; |
int | getHMTimeInMinutes(final String timeStr) Parse a string of time (in hours and minutes) and return the time in minutes. if ((timeStr == null) || (timeStr.trim().length() < 1)) { return 0; final String time = timeStr.trim(); final int colonIndex = time.indexOf(':'); if (colonIndex < 0) { return getStringAsInteger(time, 0, 0); } else if (colonIndex == 0) { ... |
String | getHourMinuteSecond(long misSecond) get Hour Minute Second if (misSecond < 0) { throw new IllegalArgumentException("The misSecond must not be negative"); long second = misSecond / 1000; long hour = second / 3600; long minute = (second % 3600) / 60; long sec = second % 3600 % 60; String hourStr = String.valueOf(hour); ... |
String | getHoursMinutesSeconds(float timeInSeconds) Returns a string in the form hours:minutes:seconds for timeInSeconds . int hours = (int) (timeInSeconds / 60 / 60); int minutes = (int) (timeInSeconds / 60) - (hours * 60); int seconds = (int) (timeInSeconds - (hours * 60 * 60) - (minutes * 60)); if (hours == 0) { return String.format("%d:%02d", minutes, seconds); } else { return String.format("%d:%02d:%02d", hours, minutes, seconds); |
String | getLessThanOneMinuteAgoRendering() get Less Than One Minute Ago Rendering return "Less than one minute ago"; |