public class Time
extends Object
Modifier and Type | Field and Description |
---|---|
static long |
DAY |
static String |
DURATION_FORMAT |
static long |
HOUR |
static long |
MINUTE |
static long |
MONTH |
static String |
RFC822_FORMAT |
static long |
SECOND |
static String |
SHORT_TIMESTAMP_FORMAT |
static String |
TIMESTAMP_FORMAT |
static long |
WEEK |
static long |
YEAR |
Constructor and Description |
---|
Time() |
Modifier and Type | Method and Description |
---|---|
static Date |
getDate(Calendar cal) |
static Date |
getDate(Date date,
TimeZone tz) |
static Date |
getDate(TimeZone tz) |
static String |
getDescription(long milliseconds) |
static String |
getDescription(long milliseconds,
boolean approximate) |
static String |
getDuration(long milliseconds) |
static String |
getRelativeTimeDescription(Date date,
Locale locale,
TimeZone timeZone) |
static String |
getRelativeTimeDescription(Date date,
Locale locale,
TimeZone timeZone,
Format dateTimeFormat) |
static String |
getRelativeTimeDescription(long milliseconds,
Locale locale,
TimeZone timeZone) |
static String |
getRelativeTimeDescription(long milliseconds,
Locale locale,
TimeZone timeZone,
Format dateTimeFormat) |
static String |
getRFC822() |
static String |
getRFC822(Date date) |
static String |
getShortTimestamp() |
static String |
getShortTimestamp(Date date) |
static String |
getSimpleDate(Date date,
String format) |
static String |
getTimestamp() |
static String |
getTimestamp(Date date) |
public static final long DAY
public static final String DURATION_FORMAT
public static final long HOUR
public static final long MINUTE
public static final long MONTH
public static final String RFC822_FORMAT
public static final long SECOND
public static final String SHORT_TIMESTAMP_FORMAT
public static final String TIMESTAMP_FORMAT
public static final long WEEK
public static final long YEAR
public static Date getDate(Calendar cal)
public static Date getDate(Date date, TimeZone tz)
public static Date getDate(TimeZone tz)
public static String getDescription(long milliseconds)
public static String getDescription(long milliseconds, boolean approximate)
public static String getDuration(long milliseconds)
public static String getRelativeTimeDescription(Date date, Locale locale, TimeZone timeZone)
public static String getRelativeTimeDescription(Date date, Locale locale, TimeZone timeZone, Format dateTimeFormat)
public static String getRelativeTimeDescription(long milliseconds, Locale locale, TimeZone timeZone)
public static String getRelativeTimeDescription(long milliseconds, Locale locale, TimeZone timeZone, Format dateTimeFormat)
public static String getRFC822()
public static String getRFC822(Date date)
public static String getShortTimestamp()
public static String getShortTimestamp(Date date)
public static String getSimpleDate(Date date, String format)
public static String getTimestamp()
public static String getTimestamp(Date date)