类 DateUtil
- java.lang.Object
-
- org.meteoinfo.ui.calendar.DateUtil
-
public class DateUtil extends Object
A utility class for some date operations.- 版本:
- $LastChangedRevision: 95 $, $LastChangedDate: 2006-05-05 18:43:15 +0200 (Fr, 05 Mai 2006) $
- 作者:
- Kai Toedter
-
-
字段概要
字段 修饰符和类型 字段 说明 protected DatedefaultMaxSelectableDateprotected DatedefaultMinSelectableDateprotected DatemaxSelectableDateprotected DateminSelectableDate
-
构造器概要
构造器 构造器 说明 DateUtil()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleancheckDate(Date date)Checks a given date if it is in the formally specified date range.DategetMaxSelectableDate()Gets the maximum selectable date.DategetMinSelectableDate()Gets the minimum selectable date.DatesetMaxSelectableDate(Date max)Sets the maximum selectable date.DatesetMinSelectableDate(Date min)Sets the minimum selectable date.voidsetSelectableDateRange(Date min, Date max)Sets a valid date range for selectable dates.
-
-
-
方法详细资料
-
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)
-
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
-
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
-
checkDate
public boolean checkDate(Date date)
Checks a given date if it is in the formally specified date range.- 参数:
date- the date to check- 返回:
- true, if the date is within minSelectableDate and maxSelectableDate
-
-