public class TimeUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.text.SimpleDateFormat |
DATE_FORMAT_DATE |
static java.text.SimpleDateFormat |
DEFAULT_DATE_FORMAT |
Constructor and Description |
---|
TimeUtils() |
Modifier and Type | Method and Description |
---|---|
static long |
getCurrentTimeInLong()
get current time in milliseconds
|
static java.lang.String |
getCurrentTimeInString()
get current time in milliseconds, format is
DEFAULT_DATE_FORMAT |
static java.lang.String |
getCurrentTimeInString(java.text.SimpleDateFormat dateFormat)
get current time in milliseconds
|
static java.lang.String |
getTime(long timeInMillis)
long time to string, format is
DEFAULT_DATE_FORMAT |
static java.lang.String |
getTime(long timeInMillis,
java.text.SimpleDateFormat dateFormat)
long time to string
|
public static final java.text.SimpleDateFormat DEFAULT_DATE_FORMAT
public static final java.text.SimpleDateFormat DATE_FORMAT_DATE
public static java.lang.String getTime(long timeInMillis, java.text.SimpleDateFormat dateFormat)
timeInMillis
- dateFormat
- public static java.lang.String getTime(long timeInMillis)
DEFAULT_DATE_FORMAT
timeInMillis
- public static long getCurrentTimeInLong()
public static java.lang.String getCurrentTimeInString()
DEFAULT_DATE_FORMAT
public static java.lang.String getCurrentTimeInString(java.text.SimpleDateFormat dateFormat)