| com.ibm.icu.util.DateRule
All known Subclasses: com.ibm.icu.util.Holiday, com.ibm.icu.util.RangeDateRule, com.ibm.icu.util.SimpleDateRule,
DateRule | public interface DateRule (Code) | | DateRule is an interface for calculating the date of an event.
It supports both recurring events and those which occur only once.
DateRule is useful for storing information about holidays,
Daylight Savings Time rules, and other events such as meetings.
See Also: SimpleDateRule |
Method Summary | |
abstract public Date | firstAfter(Date start) Return the first occurrance of the event represented by this rule
that is on or after the given start date.
Parameters: start - Only occurrances on or after this date are returned. | abstract public Date | firstBetween(Date start, Date end) Return the first occurrance of the event represented by this rule
that is on or after the given start date and before the given
end date.
Parameters: start - Only occurrances on or after this date are returned. Parameters: end - Only occurrances before this date are returned. | abstract public boolean | isBetween(Date start, Date end) Check whether this event occurs at least once between the two
dates given. | abstract public boolean | isOn(Date date) Checks whether this event occurs on the given date. |
firstAfter | abstract public Date firstAfter(Date start)(Code) | | Return the first occurrance of the event represented by this rule
that is on or after the given start date.
Parameters: start - Only occurrances on or after this date are returned. The date on which this event occurs, or null if itdoes not occur on or after the start date. See Also: DateRule.firstBetween |
firstBetween | abstract public Date firstBetween(Date start, Date end)(Code) | | Return the first occurrance of the event represented by this rule
that is on or after the given start date and before the given
end date.
Parameters: start - Only occurrances on or after this date are returned. Parameters: end - Only occurrances before this date are returned. The date on which this event occurs, or null if itdoes not occur between the start and end dates. See Also: DateRule.firstAfter |
isBetween | abstract public boolean isBetween(Date start, Date end)(Code) | | Check whether this event occurs at least once between the two
dates given.
|
isOn | abstract public boolean isOn(Date date)(Code) | | Checks whether this event occurs on the given date. This does
not take time of day into account; instead it checks
whether this event and the given date are on the same day.
This is useful for applications such as determining whether a given
day is a holiday.
Parameters: date - The date to check. true if this event occurs on the given date. |
|
|