Java Utililty Methods Minute Get

List of utility methods to do Minute Get

Description

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

Method

floatgetMinutesInSecWOHours(long sec)
get Minutes In Sec WO Hours
float _diff_hours = (float) sec / 3600f; 
int diff_hours = (int) Math.floor(_diff_hours); 
return ((float) _diff_hours - (float) diff_hours) * 60f;
longgetMinutesOfTowDiffDate(String p_startDate, String p_endDate)
get Minutes Of Tow Diff Date
return (long) getMillisOfTowDiffDate(p_startDate, p_endDate) / (1000 * 60);
StringgetMinutesRapp(long microseconds)
Returns rappresentation of time in 00:00 format
int sec = (int) (microseconds / 1000000);
int min = sec / 60;
sec = sec % 60;
String ms = min + "";
String ss = sec + "";
if (ms.length() < 2) {
    ms = "0" + ms;
if (ss.length() < 2) {
    ss = "0" + ss;
return ms + ":" + ss;
StringgetMinutesSeconds(long millisec, String fmt)
get Minutes Seconds
long minutes = millisec / 1000 / 60;
long seconds = (millisec - (minutes * 1000 * 60)) / 1000;
if (fmt.isEmpty()) {
    fmt = "%d:%02d";
return String.format(fmt, minutes, seconds);
longgetMinutesSinceEpoch()
get Minutes Since Epoch
return (System.currentTimeMillis() / 1000);
StringgetMinutesString(long time)
get Minutes String
String string = "" + (60 * (time % 1000) / 1000);
if (string.length() < 2) {
    string = "0" + string;
return string;
longgetMinuteStart(long ts)
get Minute Start
return ts / ONE_MINUTE_TS * ONE_MINUTE_TS;
StringgetMinutesText(long minutes)
get Minutes Text
if (minutes == 0)
    return (" minutes");
return ((minutes > 1 ? " minutes" : " minute"));
StringgetMinutesTime(long msTime)
Convert time in ms to 'mm minutes ss seconds' format
if (msTime < 0) {
    return "";
long mm = msTime / (1000 * 60); 
long tmp = msTime % (1000 * 60);
long ss = tmp / 1000; 
long ms = tmp % 1000;
if (ms > 500) {
...
LonggetNextMinute(Integer minute)
get Next Minute
Long time = minute * 60000L;
return System.currentTimeMillis() + time;