Java Utililty Methods Minute

List of utility methods to do Minute

Description

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

Method

intminutes(int num)
minutes
return seconds(60 * num);
intminutes(int seconds)
minutes
return seconds * 60;
longminutes2Ms(long minutes)
Convert minutes to ms
return seconds2Ms(minutes * 60);
longminutes2seconds(long minutes)
minutesseconds
return minutes * 60;
intminutesFromEpisode(int episodeNumber, int episodeLength)
Get the elapsed minutes based off the episode number
return episodeLength * episodeNumber;
StringminutesFromSecondPadded(int seconds)
Returns the minutes:secods of a given time interval
return String.format("%02d:%02d", seconds / SECONDS_PER_MINUTE, seconds % SECONDS_PER_MINUTE);
intminutesFromSlots(int slots)
minutes From Slots
return slots * MINUTES_IN_ONE_TIME_SLOT;
doublemjdInMinutes(double mjd)
Recalculate the number of days (Modified Julian date) to minutes
return Math.round(mjd * daysToMinutes);
DatenextMinutes(int diff)
next Minutes
return add(new Date(), Calendar.MINUTE, diff);
voidnormalizeToMinute(Date date)
normalize To Minute
Calendar cal = new GregorianCalendar();
cal.setTime(date);
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.MILLISECOND, 0);
date.setTime(cal.getTime().getTime());