com.alkacon.geranium.client.util
public final class DateTimeUtil extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DateTimeUtil.Format
The standard formats.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getDate(java.util.Date date,
DateTimeUtil.Format format)
Returns a formated date String from a Date value,
the formatting based on the provided options.
|
static java.lang.String |
getDateShort(long time)
Returns a formated date String form a timestamp value,
the formatting based on the OpenCms system default locale
and the
DateTimeUtil.Format.SHORT date format. |
static java.lang.String |
getDateTime(java.util.Date date,
DateTimeUtil.Format format)
Returns a formated date and time String from a Date value,
the formatting based on the provided options.
|
static java.lang.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 the
DateTimeUtil.Format.SHORT date format. |
static java.lang.String |
getTime(java.util.Date date,
DateTimeUtil.Format format)
Returns a formated time String from a Date value,
the formatting based on the provided options.
|
public static java.lang.String getDate(java.util.Date date,
DateTimeUtil.Format format)
date - the Date object to format as Stringformat - the format to usepublic static java.lang.String getDateShort(long time)
DateTimeUtil.Format.SHORT date format.time - the time value to format as datepublic static java.lang.String getDateTime(java.util.Date date,
DateTimeUtil.Format format)
date - the Date object to format as Stringformat - the format to use, see DateTimeUtil.Format for possible valuespublic static java.lang.String getDateTimeShort(long time)
DateTimeUtil.Format.SHORT date format.time - the time value to format as datepublic static java.lang.String getTime(java.util.Date date,
DateTimeUtil.Format format)
date - the Date object to format as Stringformat - the format to use