Additional top-level class in compilation unit: Range.
Note
The Holiday framework is a technology preview. Despite its age, is still draft API, and clients should treat it as such. Implementation of DateRule that takes a range.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public Date | firstAfter(Date
Only occurrances on or after this date are returned. start)Implements com. |
| public Date | firstBetween(Date
Only occurrances on or after this date are returned. start, Date Only occurrances before this date are returned. end)Implements com. |
| public boolean | isBetween(Date start, Date end)
Implements com. |
| public boolean | isOn(Date
The date to check. date)Implements com. |
| private Range | |
| private int |
| ranges | back to summary |
|---|---|
| pack-priv List<Range> ranges | |
| RangeDateRule | back to summary |
|---|---|
public RangeDateRule()
| |
| add | back to summary |
|---|---|
public void add(DateRule rule)
| |
| add | back to summary |
|---|---|
public void add(Date start, DateRule rule)
| |
| firstAfter | back to summary |
|---|---|
| public Date firstAfter(Date start) Implements com. Doc from com. Return the first occurrance of the event represented by this rule that is on or after the given start date. | |
| firstBetween | back to summary |
|---|---|
| public Date firstBetween(Date start, Date end) Implements com. Doc from com. 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. | |
| isBetween | back to summary |
|---|---|
| public boolean isBetween(Date start, Date end) Implements com. Check whether this event occurs at least once between the two dates given. | |
| isOn | back to summary |
|---|---|
| public boolean isOn(Date date) Implements com. Doc from com. 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. | |
| rangeAt | back to summary |
|---|---|
| private Range rangeAt(int index) | |
| startIndex | back to summary |
|---|---|
| private int startIndex(Date start) | |