Android Hour Format formatHour(String string)

Here you can find the source of formatHour(String string)

Description

format Hour

Declaration

public static String formatHour(String string) 

Method Source Code

//package com.java2s;

public class Main {
    public static String formatHour(String string) {
        return (string.length() == 1) ? "0" + string : string;
    }//  w ww.  j a  va  2  s . c o  m

    public static String formatHour(int val) {
        return formatHour(String.valueOf(val));
    }
}

Related

  1. formatHour(int val)
  2. getReminderReadableTime(int hour, int minute)
  3. getCurrentHour()
  4. getDateByAddHour(String datetime, int minute)