Here you can find the source of getLabelForEventInTime(long inTime)
inTime
ms
Parameter | Description |
---|---|
intime | when event shall be happened |
inTime
ms
public static String getLabelForEventInTime(long inTime)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { private final static SimpleDateFormat formatter = new SimpleDateFormat( "dd/HH:mm:ss"); /**/* w w w . j a v a 2s.com*/ * Returns a label for event happened <code>inTime</code> ms * * @param intime * when event shall be happened * @return label for event happened <code>inTime</code> ms */ public static String getLabelForEventInTime(long inTime) { return android.text.format.DateUtils.getRelativeTimeSpanString( inTime, 0, 0) + " at " + getTimeLabel(inTime + System.currentTimeMillis()); } /** * Returns label for the time. * * @param time * the time to return label for. * @return label for the time. */ public static String getTimeLabel(long time) { return formatter.format(new Date(time)); } }