List of utility methods to do Minute Calculate
Date | setMinutes(Date date, int amount) Sets the minute field to a date returning a new object. return set(date, Calendar.MINUTE, amount);
|
String | shiftTime(Object o, int minutes) shift Time String timestamp = o.toString(); SimpleDateFormat sdf = new SimpleDateFormat("HH:mm"); Date date = null; if (timestamp != null && timestamp.length() >= 1 && timestamp.substring(0, 1).equals("-")) { date = new Date(); date.setTime(date.getTime() + 60 * 60000); } else { try { ... |
String | toDegreesMinutes(double degrees, int nDecimals, boolean longitude) to Degrees Minutes double[] dms = toDegreesMinutes(degrees); int deg = (int) dms[0]; double min = dms[1]; NumberFormat minutesFormatter = NumberFormat.getInstance(); minutesFormatter.setMinimumFractionDigits(nDecimals); minutesFormatter.setMaximumFractionDigits(nDecimals); minutesFormatter.setMinimumIntegerDigits(2); String hemisphere = longitude ? (degrees >= 0.0 ? "E" : "W") : (degrees >= 0.0 ? "N" : "S"); ... |
Long | toMinutes(Date fecha) to Minutes String sFecha = toTime(fecha); long horas = Long.parseLong(sFecha.substring(0, 2)); long minutos = Long.parseLong(sFecha.substring(3)); minutos = horas * 60 + minutos; return minutos; |
String | toMinuteString(long time) to Minute String return minutesFormatter.format(time);
|