Here you can find the source of minutesFromSecondPadded(int seconds)
Parameter | Description |
---|---|
seconds | the seconds to convert |
public static String minutesFromSecondPadded(int seconds)
//package com.java2s; //License from project: Apache License public class Main { private static final int SECONDS_PER_MINUTE = 60; /**//from ww w .j a va 2s.c om * Returns the minutes:secods of a given time interval * * @param seconds * the seconds to convert * @return the minutes:seconds representation of the interval (numbers are padded with zeros to 00:00) */ public static String minutesFromSecondPadded(int seconds) { return String.format("%02d:%02d", seconds / SECONDS_PER_MINUTE, seconds % SECONDS_PER_MINUTE); } }