com.liferay.portal.kernel.util
Class Time
java.lang.Object
com.liferay.portal.kernel.util.Time
public class Time
- extends Object
Constructor Summary |
Time()
|
Method Summary |
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)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DAY
public static final long DAY
- See Also:
- Constant Field Values
DURATION_FORMAT
public static final String DURATION_FORMAT
- See Also:
- Constant Field Values
HOUR
public static final long HOUR
- See Also:
- Constant Field Values
MINUTE
public static final long MINUTE
- See Also:
- Constant Field Values
MONTH
public static final long MONTH
- See Also:
- Constant Field Values
RFC822_FORMAT
public static final String RFC822_FORMAT
- See Also:
- Constant Field Values
SECOND
public static final long SECOND
- See Also:
- Constant Field Values
SHORT_TIMESTAMP_FORMAT
public static final String SHORT_TIMESTAMP_FORMAT
- See Also:
- Constant Field Values
TIMESTAMP_FORMAT
public static final String TIMESTAMP_FORMAT
- See Also:
- Constant Field Values
WEEK
public static final long WEEK
- See Also:
- Constant Field Values
YEAR
public static final long YEAR
- See Also:
- Constant Field Values
Time
public Time()
getDate
public static Date getDate(Calendar cal)
getDate
public static Date getDate(Date date,
TimeZone tz)
getDate
public static Date getDate(TimeZone tz)
getDescription
public static String getDescription(long milliseconds)
getDescription
public static String getDescription(long milliseconds,
boolean approximate)
getDuration
public static String getDuration(long milliseconds)
getRelativeTimeDescription
public static String getRelativeTimeDescription(Date date,
Locale locale,
TimeZone timeZone)
getRelativeTimeDescription
public static String getRelativeTimeDescription(Date date,
Locale locale,
TimeZone timeZone,
Format dateTimeFormat)
getRelativeTimeDescription
public static String getRelativeTimeDescription(long milliseconds,
Locale locale,
TimeZone timeZone)
getRelativeTimeDescription
public static String getRelativeTimeDescription(long milliseconds,
Locale locale,
TimeZone timeZone,
Format dateTimeFormat)
getRFC822
public static String getRFC822()
getRFC822
public static String getRFC822(Date date)
getShortTimestamp
public static String getShortTimestamp()
getShortTimestamp
public static String getShortTimestamp(Date date)
getSimpleDate
public static String getSimpleDate(Date date,
String format)
getTimestamp
public static String getTimestamp()
getTimestamp
public static String getTimestamp(Date date)