Class DateRange
java.lang.Object
com.googlecode.wicket.jquery.ui.plugins.datepicker.DateRange
- All Implemented Interfaces:
Serializable,org.apache.wicket.util.io.IClusterable
Provides the value type to be used as model object for
RangeDatePicker and RangeDatePickerTextFieldstart and end dates are UTC based, the JSON array (toString()) is timezone agnostic- Author:
- Sebastien Briquet - sebfz1
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEnd()Gets the end datefinal DategetStart()Gets the start datestatic DateFormatGets a new UTCDateFormatusing ISO8601 pattern, but timezone agnosticstatic DateRangeof(long start, long end) Creates a newDateRange, starting at 0:00:00.000 and ending at 23:59:59.999
Caution: supplied dates should be UTC.static DateRangeCreates a newDateRange, UTC time, starting at 0:00:00.000 and ending at 23:59:59.999
Caution: supplied dates should be local to the system (ie:new Date()).voidsetEnd(long date) Sets the end date.voidSets the end date.voidsetStart(long date) Sets the start date.voidSets the start date.static DateRangetoday()Gets a defaultDateRangefrom today 0:00:00.000 to 23:59:59.999 (UTC).toString()
-
Field Details
-
PATTERN
- See Also:
-
-
Constructor Details
-
DateRange
Constructor- Parameters:
start- the local start dateend- the local end date
-
DateRange
public DateRange(long start, long end) Constructor- Parameters:
start- the UTC start dateend- the UTC end date
-
-
Method Details
-
of
Creates a newDateRange, UTC time, starting at 0:00:00.000 and ending at 23:59:59.999
Caution: supplied dates should be local to the system (ie:new Date()).- Parameters:
start- the local start dateend- the local end date- Returns:
- a new
DateRange
-
of
Creates a newDateRange, starting at 0:00:00.000 and ending at 23:59:59.999
Caution: supplied dates should be UTC.- Parameters:
start- the UTC start dateend- the UTC end date- Returns:
- a new
DateRange
-
today
Gets a defaultDateRangefrom today 0:00:00.000 to 23:59:59.999 (UTC).- Returns:
- the
DateRange
-
newDateFormat
Gets a new UTCDateFormatusing ISO8601 pattern, but timezone agnostic- Returns:
- a new
DateFormat
-
getStart
Gets the start date- Returns:
- the start date
-
setStart
Sets the start date.- Parameters:
date- the start date
-
setStart
public void setStart(long date) Sets the start date.- Parameters:
date- the start date
-
getEnd
Gets the end date- Returns:
- the end date
-
setEnd
Sets the end date.- Parameters:
date- the end date
-
setEnd
public void setEnd(long date) Sets the end date.- Parameters:
date- the end date
-
toString
-