public class DateUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
s_colon |
Modifier | Constructor and Description |
---|---|
protected |
DateUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getTimeHMS(java.util.Date when) |
static java.lang.String |
getTimeRelative(java.util.Date then)
Return the time passed as a string
|
static java.lang.String |
getTimeRelative(java.util.Date then,
boolean past) |
static java.lang.String |
timeToString(long time)
Convert a long to a String like dd:hh:mm:ss.
|
public static final java.lang.String s_colon
public static java.lang.String getTimeRelative(java.util.Date then)
then
- The date to compare topublic static java.lang.String getTimeRelative(java.util.Date then, boolean past)
public static java.lang.String getTimeHMS(java.util.Date when)
public static java.lang.String timeToString(long time)
time
- Usually a diff between currentTime.getTime() and startTime.getTime(). Includes milliseconds.