Package org.opencms.gwt.client.util
Class CmsDateTimeUtil
java.lang.Object
org.opencms.gwt.client.util.CmsDateTimeUtil
Client side implementation for
CmsDateUtil
.- Since:
- 8.0.0
- See Also:
-
CmsDateUtil
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getDate
(Date date, CmsDateTimeUtil.Format format) Returns a formated date String from a Date value, the formatting based on the provided options.static String
getDateShort
(long time) Returns a formated date String form a timestamp value, the formatting based on the OpenCms system default locale and theCmsDateTimeUtil.Format.SHORT
date format.static String
getDateTime
(Date date, CmsDateTimeUtil.Format format) Returns a formated date and time String from a Date value, the formatting based on the provided options.static String
getDateTimeShort
(long time) Returns a formated date and time String form a timestamp value, the formatting based on the OpenCms system default locale and theCmsDateTimeUtil.Format.SHORT
date format.static String
getTime
(Date date, CmsDateTimeUtil.Format format) Returns a formated time String from a Date value, the formatting based on the provided options.
-
Method Details
-
getDate
Returns a formated date String from a Date value, the formatting based on the provided options.- Parameters:
date
- the Date object to format as Stringformat
- the format to use- Returns:
- the formatted date
-
getDateShort
Returns a formated date String form a timestamp value, the formatting based on the OpenCms system default locale and theCmsDateTimeUtil.Format.SHORT
date format.- Parameters:
time
- the time value to format as date- Returns:
- the formatted date
-
getDateTime
Returns a formated date and time String from a Date value, the formatting based on the provided options.- Parameters:
date
- the Date object to format as Stringformat
- the format to use, seeCmsDateTimeUtil.Format
for possible values- Returns:
- the formatted date
-
getDateTimeShort
Returns a formated date and time String form a timestamp value, the formatting based on the OpenCms system default locale and theCmsDateTimeUtil.Format.SHORT
date format.- Parameters:
time
- the time value to format as date- Returns:
- the formatted date
-
getTime
Returns a formated time String from a Date value, the formatting based on the provided options.- Parameters:
date
- the Date object to format as Stringformat
- the format to use- Returns:
- the formatted time
-