public class CmsJspInstanceDateBean extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CmsJspInstanceDateBean.CmsDateFormatOption
Formatting options for dates.
|
class |
CmsJspInstanceDateBean.CmsDateFormatTransformer
Transformer from formatting options to formatted dates.
|
Constructor and Description |
---|
CmsJspInstanceDateBean(java.util.Date start,
CmsJspDateSeriesBean series)
Constructor taking start and end time for the single event.
|
CmsJspInstanceDateBean(java.util.Date date,
java.util.Locale locale)
Constructor to wrap a single date as instance date.
|
Modifier and Type | Method and Description |
---|---|
java.util.Date |
getEnd()
Returns the end time of the event.
|
CmsJspInstanceDateBean |
getEndInstance()
Returns an instance date bean wrapping only the end date of the original bean.
|
java.util.Map<java.lang.String,java.lang.String> |
getFormat()
Returns a lazy map from date format options to dates.
|
java.lang.String |
getFormatLong()
Returns the start and end dates/times as "start - end" in long date format and short time format specific for the request locale.
|
java.lang.String |
getFormatShort()
Returns the start and end dates/times as "start - end" in short date/time format specific for the request locale.
|
boolean |
getIsSet()
Check, if the start date of the instance date is 0 milliseconds.
|
java.util.Date |
getLastDay()
Returns some time of the last day, the event takes place.
|
java.util.Date |
getStart()
Returns the start time of the event.
|
CmsJspInstanceDateBean |
getStartInstance()
Returns an instance date bean wrapping only the start date of the original bean.
|
boolean |
isMultiDay()
Returns a flag, indicating if the event last over night.
|
boolean |
isWholeDay()
Returns a flag, indicating if the event lasts whole days.
|
void |
setEnd(java.util.Date endDate)
Explicitly set the end time of the event.
|
void |
setWholeDay(java.lang.Boolean isWholeDay)
Explicitly set if the single event is whole day.
|
public CmsJspInstanceDateBean(java.util.Date start, CmsJspDateSeriesBean series)
start
- the start time of the event.series
- the series, the event is part of.public CmsJspInstanceDateBean(java.util.Date date, java.util.Locale locale)
date
- the date to wraplocale
- the locale to use for formatting the date.public java.util.Date getEnd()
public CmsJspInstanceDateBean getEndInstance()
public java.util.Map<java.lang.String,java.lang.String> getFormat()
CmsJspInstanceDateBean.CmsDateFormatOption
.Each option must be backed up by four three keys in the message "bundle org.opencms.jsp.util.messages" for you locale: GUI_PATTERN_DATE_{Option}, GUI_PATTERN_DATE_TIME_{Option} and GUI_PATTERN_TIME_{Option}.
public java.lang.String getFormatLong()
public java.lang.String getFormatShort()
public boolean getIsSet()
public java.util.Date getLastDay()
public java.util.Date getStart()
public CmsJspInstanceDateBean getStartInstance()
public boolean isMultiDay()
true
if the event ends on another day than it starts, false
if it ends on the same day.public boolean isWholeDay()
public void setEnd(java.util.Date endDate)
null
or a date before the start date, the end date defaults to the start date.endDate
- the end time of the event.public void setWholeDay(java.lang.Boolean isWholeDay)
isWholeDay
- flag, indicating if the single event lasts the whole day.
If null
the value defaults to the setting from the underlying date series.