Package com.liferay.portal.kernel.util
Class Time
Object
com.liferay.portal.kernel.util.Time
- Author:
- Brian Wing Shun Chan
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Date
static Date
static Date
static String
getDescription
(long milliseconds) static String
getDescription
(long milliseconds, boolean approximate) static String
getDuration
(long milliseconds) static String
getRelativeTimeDescription
(long milliseconds, Locale locale, TimeZone timeZone) static String
getRelativeTimeDescription
(long milliseconds, Locale locale, TimeZone timeZone, Format dateTimeFormat) static String
getRelativeTimeDescription
(Date date, Locale locale, TimeZone timeZone) static String
getRelativeTimeDescription
(Date date, Locale locale, TimeZone timeZone, Format dateTimeFormat) static String
static String
static String
static String
getShortTimestamp
(Date date) static String
getSimpleDate
(Date date, String format) static String
static String
getTimestamp
(Date date)
-
Field Details
-
DAY
public static final long DAY- See Also:
-
DURATION_FORMAT
- See Also:
-
HOUR
public static final long HOUR- See Also:
-
MINUTE
public static final long MINUTE- See Also:
-
MONTH
public static final long MONTH- See Also:
-
RFC822_FORMAT
- See Also:
-
SECOND
public static final long SECOND- See Also:
-
SHORT_TIMESTAMP_FORMAT
- See Also:
-
TIMESTAMP_FORMAT
- See Also:
-
WEEK
public static final long WEEK- See Also:
-
YEAR
public static final long YEAR- See Also:
-
-
Constructor Details
-
Time
public Time()
-
-
Method Details
-
getDate
-
getDate
-
getDate
-
getDescription
-
getDescription
-
getDuration
-
getRelativeTimeDescription
-
getRelativeTimeDescription
-
getRelativeTimeDescription
-
getRelativeTimeDescription
-
getRFC822
-
getRFC822
-
getShortTimestamp
-
getShortTimestamp
-
getSimpleDate
-
getTimestamp
-
getTimestamp
-