Java Utililty Methods Minute Convert

List of utility methods to do Minute Convert

Description

The list of methods to do Minute Convert are organized into topic(s).

Method

doubleconvertDegreeMinuteSecond(double degree, double minute, double second)
convert Degree Minute Second
return degree + convertMinuteSecond(minute, second);
intconvertHoursMinutesSecondsToSeconds(String offset)
Given a string of the form hh:mm:ss or mm:ss, returns the total seconds
boolean isOK = true;
StringTokenizer tokenizer = new StringTokenizer(offset, ":");
String token = null;
int first = -1;
int second = -1;
int third = -1;
try {
    token = tokenizer.nextToken();
...
LongconvertHoursToMinutes(Double hours)
convert Hours To Minutes
if (hours == null) {
    return 0L;
} else {
    return Math.round(hours * 60);
intconvertHoursToMinutes(final int hours)
Convert hours to minutes.
return hours * MINUTES_PER_HOUR;
StringconvertMillisToHoursMinutesSeconds(long offset)
Converts a millisecond offset into a friendlier hh:mm:ss format & returns the string.
return convertSecondsToHoursMinutesSeconds((int) (offset / 1000));
intconvertMinute(String targetHhMm)
convert Minute
String hour = targetHhMm.substring(0, 2);
String min = targetHhMm.substring(2);
int hourInt = Integer.parseInt(hour);
int minInt = Integer.parseInt(min);
return hourInt * 60 + minInt;
doubleconvertMinuteSecond(double minute, double second)
convert Minute Second
return (minute / 60.0) + (second / 3600.0);
intconvertMinutesSecondsToMilliseconds(String offset)
Given a string of the form mm:ss, returns the total milliseconds
boolean isOK = true;
StringTokenizer tokenizer = new StringTokenizer(offset, ":");
String token = null;
int first = -1;
int second = -1;
try {
    token = tokenizer.nextToken();
} catch (NoSuchElementException e) {
...
longconvertMinutesToMilliseconds(final long minutes)
convert Minutes To Milliseconds
return convertMinutesToSeconds(minutes) * MILLISECONDS_PER_SECOND;
longconvertMinutesToSeconds(final long minutes)
convert Minutes To Seconds
return minutes * SECONDS_PER_MINUTE;