Java Digit From toDigiTime(int Zeit)

Here you can find the source of toDigiTime(int Zeit)

Description

to Digi Time

License

Open Source License

Parameter

Parameter Description
Zeit Time in seconds to be converted into digital time.

Return

Returns a string with with the time seperated by a : like you would see it on a digital clock

Declaration

public static String toDigiTime(int Zeit) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**//from  w  w w  .  ja v a 2  s .c om
     * 
     * @param Zeit Time in seconds to be converted into digital time.
     * @return Returns a string with with the time seperated by a : like you would see it on a digital clock
     */
    public static String toDigiTime(int Zeit) {
        String Digi;
        Digi = "" + Zeit / 60 + ":"
                + ((Zeit - Zeit / 60 * 60) < 10 ? "0" + (Zeit - Zeit / 60 * 60) : (Zeit - Zeit / 60 * 60));
        return Digi;
    }
}

Related

  1. toDigit(final int value)
  2. toDigit(int c)
  3. toDigit(int i)
  4. toDigit(int n)
  5. toDigit(int n)