com.toedter.calendar
Class DateUtil
java.lang.Object
com.toedter.calendar.DateUtil
public class DateUtil
extends java.lang.Object
A utility class for some date operations.
$LastChangedRevision: 95 $, $LastChangedDate: 2006-05-05 18:43:15 +0200 (Fr, 05 Mai 2006) $
defaultMaxSelectableDate
protected Date defaultMaxSelectableDate
defaultMinSelectableDate
protected Date defaultMinSelectableDate
maxSelectableDate
protected Date maxSelectableDate
minSelectableDate
protected Date minSelectableDate
DateUtil
public DateUtil()
checkDate
public boolean checkDate(Date date)
Checks a given date if it is in the formally specified date range.
- true, if the date is within minSelectableDate and
maxSelectableDate
getMaxSelectableDate
public Date getMaxSelectableDate()
Gets the maximum selectable date.
- the maximum selectable date
getMinSelectableDate
public Date getMinSelectableDate()
Gets the minimum selectable date.
- the minimum selectable date
setMaxSelectableDate
public Date setMaxSelectableDate(Date max)
Sets the maximum selectable date. If null, the date 01\01\9999 will be set instead.
max
- the maximum selectable date
- the maximum selectable date
setMinSelectableDate
public Date setMinSelectableDate(Date min)
Sets the minimum selectable date. If null, the date 01\01\0001 will be set instead.
min
- the minimum selectable date
- the minimum selectable date
setSelectableDateRange
public void setSelectableDateRange(Date min,
Date max)
Sets a valid date range for selectable dates. If max is before min, the
default range with no limitation is set.
min
- the minimum selectable date or null (then the minimum date is
set to 01\01\0001)max
- the maximum selectable date or null (then the maximum date is
set to 01\01\9999)
Copyright B) 1999 - 2006 Kai Toedter.