Here you can find the source of hrColMin(final long time, final boolean alwaysIncludeHours)
public static StringBuilder hrColMin(final long time, final boolean alwaysIncludeHours)
//package com.java2s; import android.util.Log; public class Main { public static StringBuilder hrColMin(final long time, final boolean alwaysIncludeHours) { final long seconds = time / 1000; final long minutes = (seconds / 60) % 60; final long hours = (seconds / (60 * 60)) % 60; Log.i("DateTimeUtils", "hrColMin hours minutes seconds: " + hours + " : " + minutes + " : " + seconds); final StringBuilder asText = new StringBuilder(); if (alwaysIncludeHours || hours > 0) { if (hours < 10) { asText.append(0);/*from w ww. j av a 2 s .c o m*/ } asText.append(hours); asText.append(":"); } if (minutes > 0) { if (minutes < 10) { asText.append(0); } asText.append(minutes); } else { asText.append("00"); } return asText; } }