Here you can find the source of getReminderReadableTime(int hour, int minute)
public static String getReminderReadableTime(int hour, int minute)
//package com.java2s; public class Main { public static String getReminderReadableTime(int hour, int minute) { StringBuilder sb = new StringBuilder(); String period = " AM"; if (hour == 0) { hour = 12;//from w ww .ja v a 2 s . com period = " AM"; } else if (hour == 12) { period = " PM"; } else if (13 <= hour && hour <= 23) { period = " PM"; hour = hour % 12; } if (hour < 10) { sb.append("0"); } sb.append(hour); sb.append(":"); if (minute < 10) { sb.append("0"); } sb.append(minute); sb.append(period); return sb.toString(); } }