Android Hour Format time2String(int hour, int minute)

Here you can find the source of time2String(int hour, int minute)

Description

Convert integer hour and minute to string format

Return

Converted hour in "hh:mm" format

Declaration

public static String time2String(int hour, int minute) 

Method Source Code

//package com.java2s;

public class Main {
    /**//from   ww  w. ja v a  2s .c om
     * Convert integer hour and minute to string format
     * 
     * @return Converted hour in "hh:mm" format
     */
    public static String time2String(int hour, int minute) {
        return String.format("%02d", hour) + ":"
                + String.format("%02d", minute);
    }
}

Related

  1. getCurrentHour()
  2. getDateByAddHour(String datetime, int minute)
  3. getDateByAddFltHour(float flt)
  4. homiToString(int hour, int minute)
  5. formatElapsedTime(StringBuilder recycle, String format, long hours, long minutes, long seconds)