List of utility methods to do Milliseconds to Minutes And Seconds Convert
String | milisecondsToMinutesAndSeconds(int milliseconds) miliseconds To Minutes And Seconds int seconds = (int) (milliseconds / 1000) % 60; int minutes = (int) ((milliseconds / (1000 * 60)) % 60); int hours = (int) ((milliseconds / (1000 * 60 * 60)) % 24); StringBuffer buffer = new StringBuffer(); String prefix = ""; if (hours > 0) { prefix = hours < 10 ? "0" : ""; buffer.append(prefix + hours + ":"); ... |
int | getMinute(long dateTimeMillis) get Minute SimpleDateFormat format = new SimpleDateFormat("mm"); StringBuilder dateString = new StringBuilder( format.format(dateTimeMillis)); return Integer.parseInt(dateString.toString()); |
int | getMillisecondsUntilNextMinute() get Milliseconds Until Next Minute Calendar c = Calendar.getInstance(); long ms = c.getTimeInMillis(); long nextminute = (ms + (MINUTE_IN_MILLISECONDS - 1)) / MINUTE_IN_MILLISECONDS * MINUTE_IN_MILLISECONDS; int result = (int) (nextminute - ms); return result; |