public class SimpleDateRule extends java.lang.Object implements DateRule
| Constructor and Description |
|---|
SimpleDateRule(int month,
int dayOfMonth)
Construct a rule for a fixed date within a month
|
SimpleDateRule(int month,
int dayOfMonth,
int dayOfWeek,
boolean after)
Construct a rule for a weekday within a month, e.g. the first Monday.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Date |
firstAfter(java.util.Date start)
Return the first occurrance of the event represented by this rule
that is on or after the given start date.
|
java.util.Date |
firstBetween(java.util.Date start,
java.util.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.
|
boolean |
isBetween(java.util.Date start,
java.util.Date end)
Check whether this event occurs at least once between the two
dates given.
|
boolean |
isOn(java.util.Date date)
Checks whether this event occurs on the given date.
|
public SimpleDateRule(int month,
int dayOfMonth)
month - The month in which this rule occurs (0-based).dayOfMonth - The date in that month (1-based).public SimpleDateRule(int month,
int dayOfMonth,
int dayOfWeek,
boolean after)
month - The month in which this rule occurs (0-based).dayOfMonth - A date within that month (1-based).dayOfWeek - The day of the week on which this rule occurs.after - If true, this rule selects the first dayOfWeek
on or after dayOfMonth. If false, the rule selects
the first dayOfWeek on or before dayOfMonth.public java.util.Date firstAfter(java.util.Date start)
firstAfter in interface DateRulestart - Only occurrances on or after this date are returned.firstBetween(java.util.Date, java.util.Date)public java.util.Date firstBetween(java.util.Date start,
java.util.Date end)
firstBetween in interface DateRulestart - Only occurrances on or after this date are returned.end - Only occurrances before this date are returned.firstAfter(java.util.Date)public boolean isOn(java.util.Date date)
Copyright © 2016 Unicode, Inc. and others.